diff options
9 files changed, 103 insertions, 94 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/ArrayTools.java b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/ArrayTools.java index 3ff76a0df7..6989099862 100644 --- a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/ArrayTools.java +++ b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/ArrayTools.java @@ -441,8 +441,7 @@ public final class ArrayTools { * specified array 1 followed by the elements * in the specified array 2. */ - @SafeVarargs - public static <E> E[] addAll(E[] array1, E... array2) { + public static <E> E[] addAll(E[] array1, E[] array2) { return addAll(array1, array2, array2.length); } @@ -482,8 +481,7 @@ public final class ArrayTools { * first specified array with the objects in the second * specified array added at the specified index. */ - @SafeVarargs - public static <E> E[] addAll(E[] array1, int index, E... array2) { + public static <E> E[] addAll(E[] array1, int index, E[] array2) { return addAll(array1, index, array2, array2.length); } @@ -624,7 +622,7 @@ public final class ArrayTools { * specified array 1 followed by the elements * in the specified array 2. */ - public static char[] addAll(char[] array1, char... array2) { + public static char[] addAll(char[] array1, char[] array2) { return addAll(array1, array2, array2.length); } @@ -664,7 +662,7 @@ public final class ArrayTools { * first specified array with the objects in the second * specified array added at the specified index. */ - public static char[] addAll(char[] array1, int index, char... array2) { + public static char[] addAll(char[] array1, int index, char[] array2) { return addAll(array1, index, array2, array2.length); } @@ -709,7 +707,7 @@ public final class ArrayTools { * specified array 1 followed by the elements * in the specified array 2. */ - public static int[] addAll(int[] array1, int... array2) { + public static int[] addAll(int[] array1, int[] array2) { return addAll(array1, array2, array2.length); } @@ -749,7 +747,7 @@ public final class ArrayTools { * first specified array with the objects in the second * specified array added at the specified index. */ - public static int[] addAll(int[] array1, int index, int... array2) { + public static int[] addAll(int[] array1, int index, int[] array2) { return addAll(array1, index, array2, array2.length); } @@ -1041,7 +1039,7 @@ public final class ArrayTools { * Return whether the specified array 1 contains all of the * elements in the specified array 2. */ - public static boolean containsAll(Object[] array1, Object... array2) { + public static boolean containsAll(Object[] array1, Object[] array2) { // use hashed lookup HashSet<Object> set = CollectionTools.hashSet(array1); for (int i = array2.length; i-- > 0; ) { @@ -1056,7 +1054,7 @@ public final class ArrayTools { * Return whether the specified array 1 contains all of the * elements in the specified array 2. */ - public static boolean containsAll(char[] array1, char... array2) { + public static boolean containsAll(char[] array1, char[] array2) { for (int i = array2.length; i-- > 0; ) { if ( ! contains(array1, array2[i])) { return false; @@ -1069,7 +1067,7 @@ public final class ArrayTools { * Return whether the specified array 1 contains all of the * elements in the specified array 2. */ - public static boolean containsAll(int[] array1, int... array2) { + public static boolean containsAll(int[] array1, int[] array2) { for (int i = array2.length; i-- > 0; ) { if ( ! contains(array1, array2[i])) { return false; @@ -1702,7 +1700,7 @@ public final class ArrayTools { /** * Return the character from the specified array with the minimum value. */ - public static char min(char... array) { + public static char min(char[] array) { int len = array.length; if (len == 0) { throw new IndexOutOfBoundsException(); @@ -1721,7 +1719,7 @@ public final class ArrayTools { /** * Return the integer from the specified array with the minimum value. */ - public static int min(int... array) { + public static int min(int[] array) { int len = array.length; if (len == 0) { throw new IndexOutOfBoundsException(); @@ -1778,7 +1776,7 @@ public final class ArrayTools { /** * Return the character from the specified array with the maximum value. */ - public static char max(char... array) { + public static char max(char[] array) { int len = array.length; if (len == 0) { throw new IndexOutOfBoundsException(); @@ -1797,7 +1795,7 @@ public final class ArrayTools { /** * Return the integer from the specified array with the maximum value. */ - public static int max(int... array) { + public static int max(int[] array) { int len = array.length; if (len == 0) { throw new IndexOutOfBoundsException(); @@ -2119,7 +2117,7 @@ public final class ArrayTools { * Remove from the first specified array all the elements in * the second specified array and return the result. */ - public static <E> E[] removeAll(E[] array1, Object... array2) { + public static <E> E[] removeAll(E[] array1, Object[] array2) { // convert to a set to take advantage of hashed look-up return (array2.length == 0) ? array1 : removeAll_(array1, CollectionTools.hashSet(array2)); } @@ -2128,7 +2126,7 @@ public final class ArrayTools { * Remove from the first specified array all the elements in * the second specified array and return the result. */ - public static char[] removeAll(char[] array1, char... array2) { + public static char[] removeAll(char[] array1, char[] array2) { if (array2.length == 0) { return array1; } @@ -2158,7 +2156,7 @@ public final class ArrayTools { * Remove from the first specified array all the elements in * the second specified array and return the result. */ - public static int[] removeAll(int[] array1, int... array2) { + public static int[] removeAll(int[] array1, int[] array2) { if (array2.length == 0) { return array1; } @@ -2283,8 +2281,7 @@ public final class ArrayTools { * Remove any duplicate elements from the specified array, * while maintaining the order. */ - @SafeVarargs - public static <E> E[] removeDuplicateElements(E... array) { + public static <E> E[] removeDuplicateElements(E[] array) { int len = array.length; if (len <= 1) { return array; @@ -2627,7 +2624,7 @@ public final class ArrayTools { * Remove from the first specified array all the elements in * the second specified array and return the result. */ - public static char[] retainAll(char[] array1, char... array2) { + public static char[] retainAll(char[] array1, char[] array2) { int array1Length = array1.length; return (array1Length == 0) ? array1 : retainAll(array1, array2, array1Length); } @@ -2666,7 +2663,7 @@ public final class ArrayTools { * Remove from the first specified array all the elements in * the second specified array and return the result. */ - public static int[] retainAll(int[] array1, int... array2) { + public static int[] retainAll(int[] array1, int[] array2) { int array1Length = array1.length; return (array1Length == 0) ? array1 : retainAll(array1, array2, array1Length); } @@ -2707,8 +2704,7 @@ public final class ArrayTools { /** * Return the array, reversed. */ - @SafeVarargs - public static <E> E[] reverse(E... array) { + public static <E> E[] reverse(E[] array) { int len = array.length; if (len <= 1) { return array; @@ -2722,7 +2718,7 @@ public final class ArrayTools { /** * Return the array, reversed. */ - public static char[] reverse(char... array) { + public static char[] reverse(char[] array) { int len = array.length; return (len <= 1) ? array : reverse(array, len); } @@ -2740,7 +2736,7 @@ public final class ArrayTools { /** * Return the array, reversed. */ - public static int[] reverse(int... array) { + public static int[] reverse(int[] array) { int len = array.length; if (len <= 1) { return array; @@ -2757,8 +2753,7 @@ public final class ArrayTools { /** * Return the rotated array after rotating it one position. */ - @SafeVarargs - public static <E> E[] rotate(E... array) { + public static <E> E[] rotate(E[] array) { return rotate(array, 1); } @@ -2797,7 +2792,7 @@ public final class ArrayTools { /** * Return the rotated array after rotating it one position. */ - public static char[] rotate(char... array) { + public static char[] rotate(char[] array) { return rotate(array, 1); } @@ -2836,7 +2831,7 @@ public final class ArrayTools { /** * Return the rotated array after rotating it one position. */ - public static int[] rotate(int... array) { + public static int[] rotate(int[] array) { return rotate(array, 1); } @@ -2880,8 +2875,7 @@ public final class ArrayTools { /** * Return the array after "shuffling" it. */ - @SafeVarargs - public static <E> E[] shuffle(E... array) { + public static <E> E[] shuffle(E[] array) { return shuffle(array, RANDOM); } @@ -2902,7 +2896,7 @@ public final class ArrayTools { /** * Return the array after "shuffling" it. */ - public static char[] shuffle(char... array) { + public static char[] shuffle(char[] array) { return shuffle(array, RANDOM); } @@ -2923,7 +2917,7 @@ public final class ArrayTools { /** * Return the array after "shuffling" it. */ - public static int[] shuffle(int... array) { + public static int[] shuffle(int[] array) { return shuffle(array, RANDOM); } @@ -3420,7 +3414,7 @@ public final class ArrayTools { * Return the array after it has been "sorted". * @see Arrays#sort(byte[]) */ - public static byte[] sort(byte... array) { + public static byte[] sort(byte[] array) { Arrays.sort(array); return array; } @@ -3438,7 +3432,7 @@ public final class ArrayTools { * Return the array after it has been "sorted". * @see Arrays#sort(char[]) */ - public static char[] sort(char... array) { + public static char[] sort(char[] array) { Arrays.sort(array); return array; } @@ -3456,7 +3450,7 @@ public final class ArrayTools { * Return the array after it has been "sorted". * @see Arrays#sort(double[]) */ - public static double[] sort(double... array) { + public static double[] sort(double[] array) { Arrays.sort(array); return array; } @@ -3474,7 +3468,7 @@ public final class ArrayTools { * Return the array after it has been "sorted". * @see Arrays#sort(float[]) */ - public static float[] sort(float... array) { + public static float[] sort(float[] array) { Arrays.sort(array); return array; } @@ -3492,7 +3486,7 @@ public final class ArrayTools { * Return the array after it has been "sorted". * @see Arrays#sort(int[]) */ - public static int[] sort(int... array) { + public static int[] sort(int[] array) { Arrays.sort(array); return array; } @@ -3510,8 +3504,7 @@ public final class ArrayTools { * Return the array after it has been "sorted". * @see Arrays#sort(Object[]) */ - @SafeVarargs - public static <E> E[] sort(E... array) { + public static <E> E[] sort(E[] array) { Arrays.sort(array); return array; } @@ -3547,7 +3540,7 @@ public final class ArrayTools { * Return the array after it has been "sorted". * @see Arrays#sort(long[]) */ - public static long[] sort(long... array) { + public static long[] sort(long[] array) { Arrays.sort(array); return array; } @@ -3565,7 +3558,7 @@ public final class ArrayTools { * Return the array after it has been "sorted". * @see Arrays#sort(short[]) */ - public static short[] sort(short... array) { + public static short[] sort(short[] array) { Arrays.sort(array); return array; } diff --git a/common/tests/org.eclipse.jpt.common.utility.tests/src/org/eclipse/jpt/common/utility/tests/internal/ArrayToolsTests.java b/common/tests/org.eclipse.jpt.common.utility.tests/src/org/eclipse/jpt/common/utility/tests/internal/ArrayToolsTests.java index 445c5f6cea..9e49581327 100644 --- a/common/tests/org.eclipse.jpt.common.utility.tests/src/org/eclipse/jpt/common/utility/tests/internal/ArrayToolsTests.java +++ b/common/tests/org.eclipse.jpt.common.utility.tests/src/org/eclipse/jpt/common/utility/tests/internal/ArrayToolsTests.java @@ -670,8 +670,8 @@ public class ArrayToolsTests String[] newArray = ArrayTools.addAll(a1, a2); assertEquals(6, newArray.length); - assertTrue(ArrayTools.containsAll(newArray, (Object[]) a1)); - assertTrue(ArrayTools.containsAll(newArray, (Object[]) a2)); + assertTrue(ArrayTools.containsAll(newArray, a1)); + assertTrue(ArrayTools.containsAll(newArray, a2)); } public void testAddAllObjectArrayObjectArray_ObjectString() { @@ -681,7 +681,7 @@ public class ArrayToolsTests assertEquals(6, newArray.length); assertTrue(ArrayTools.containsAll(newArray, a1)); - assertTrue(ArrayTools.containsAll(newArray, (Object[]) a2)); + assertTrue(ArrayTools.containsAll(newArray, a2)); } public void testAddAllObjectArrayObjectArray_EmptyArray1() { @@ -3394,14 +3394,14 @@ public class ArrayToolsTests String[] array1 = this.buildStringArray1(); String[] array2 = ArrayTools.shuffle(this.buildStringArray1()); assertEquals(array1.length, array2.length); - assertTrue(ArrayTools.containsAll(array1, (Object[]) array2)); + assertTrue(ArrayTools.containsAll(array1, array2)); } public void testShuffleObjectArray_Singleton() { String[] array1 = new String[] { "foo" }; String[] array2 = ArrayTools.shuffle(new String[] { "foo" }); assertEquals(array1.length, array2.length); - assertTrue(ArrayTools.containsAll(array1, (Object[]) array2)); + assertTrue(ArrayTools.containsAll(array1, array2)); } public void testShuffleCharArray() { diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/v2_1/AbstractELJaxb_2_1_PlatformDefinition.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/v2_1/AbstractELJaxb_2_1_PlatformDefinition.java index 7c808f51b1..652a549b3f 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/v2_1/AbstractELJaxb_2_1_PlatformDefinition.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/v2_1/AbstractELJaxb_2_1_PlatformDefinition.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Oracle. All rights reserved. + * Copyright (c) 2011, 2015 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -65,17 +65,19 @@ public abstract class AbstractELJaxb_2_1_PlatformDefinition @Override protected AnnotationDefinition[] buildAnnotationDefinitions() { - return ArrayTools.addAll( - getGenericJaxbPlatformDefinition().getAnnotationDefinitions(), - XmlInverseReferenceAnnotationDefinition.instance(), - XmlPathsAnnotationDefinition.instance()); + return ArrayTools.addAll(getGenericJaxbPlatformDefinition().getAnnotationDefinitions(), + new AnnotationDefinition[] { + XmlInverseReferenceAnnotationDefinition.instance(), + XmlPathsAnnotationDefinition.instance() + }); } @Override protected NestableAnnotationDefinition[] buildNestableAnnotationDefinitions() { - return ArrayTools.addAll( + return ArrayTools.add( getGenericJaxbPlatformDefinition().getNestableAnnotationDefinitions(), - XmlPathAnnotationDefinition.instance()); + XmlPathAnnotationDefinition.instance() + ); } @Override diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/v2_2/AbstractELJaxb_2_2_PlatformDefinition.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/v2_2/AbstractELJaxb_2_2_PlatformDefinition.java index f78001de00..1974331ec1 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/v2_2/AbstractELJaxb_2_2_PlatformDefinition.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/v2_2/AbstractELJaxb_2_2_PlatformDefinition.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Oracle. All rights reserved. + * Copyright (c) 2011, 2015 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -43,28 +43,26 @@ public abstract class AbstractELJaxb_2_2_PlatformDefinition @Override protected JaxbResourceModelProvider[] buildResourceModelProviders() { - return ArrayTools.addAll( - super.buildResourceModelProviders(), - OxmResourceModelProvider.instance()); + return ArrayTools.add(super.buildResourceModelProviders(), OxmResourceModelProvider.instance()); } @Override protected AnnotationDefinition[] buildAnnotationDefinitions() { - return ArrayTools.addAll( - super.buildAnnotationDefinitions(), - XmlCDATAAnnotationDefinition.instance(), - XmlDiscriminatorNodeAnnotationDefinition.instance(), - XmlDiscriminatorValueAnnotationDefinition.instance(), - XmlJoinNodesAnnotationDefinition.instance(), - XmlKeyAnnotationDefinition.instance(), - XmlTransformationAnnotationDefinition.instance()); + return ArrayTools.addAll(super.buildAnnotationDefinitions(), + new AnnotationDefinition[] { + XmlCDATAAnnotationDefinition.instance(), + XmlDiscriminatorNodeAnnotationDefinition.instance(), + XmlDiscriminatorValueAnnotationDefinition.instance(), + XmlJoinNodesAnnotationDefinition.instance(), + XmlKeyAnnotationDefinition.instance(), + XmlTransformationAnnotationDefinition.instance() + } + ); } @Override protected NestableAnnotationDefinition[] buildNestableAnnotationDefinitions() { - return ArrayTools.addAll( - super.buildNestableAnnotationDefinitions(), - XmlJoinNodeAnnotationDefinition.instance()); + return ArrayTools.add(super.buildNestableAnnotationDefinitions(), XmlJoinNodeAnnotationDefinition.instance()); } @Override diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/ReferenceTableComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/ReferenceTableComposite.java index 8a660e40d8..bfed4cc98e 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/ReferenceTableComposite.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/ReferenceTableComposite.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2012 Oracle. All rights reserved. + * Copyright (c) 2009, 2015 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -13,6 +13,7 @@ import java.util.Arrays; import java.util.Collection; import org.eclipse.jpt.common.ui.internal.widgets.Pane; import org.eclipse.jpt.common.utility.internal.ArrayTools; +import org.eclipse.jpt.common.utility.internal.StringTools; import org.eclipse.jpt.common.utility.internal.iterable.SuperListIterableWrapper; import org.eclipse.jpt.common.utility.internal.model.value.ListAspectAdapter; import org.eclipse.jpt.common.utility.internal.model.value.ListPropertyValueModelAdapter; @@ -249,9 +250,11 @@ public abstract class ReferenceTableComposite<T extends ReferenceTable> }; } - /* CU private */ static final Collection<String> TABLE_PICK_LIST_PROPERTIES = Arrays.asList(ArrayTools.addAll(SCHEMA_PICK_LIST_PROPERTIES.toArray(new String[0]), - Table.DEFAULT_SCHEMA_PROPERTY, - Table.SPECIFIED_SCHEMA_PROPERTY + /* CU private */ static final Collection<String> TABLE_PICK_LIST_PROPERTIES = Arrays.asList(ArrayTools.addAll(SCHEMA_PICK_LIST_PROPERTIES.toArray(StringTools.EMPTY_STRING_ARRAY), + new String[] { + Table.DEFAULT_SCHEMA_PROPERTY, + Table.SPECIFIED_SCHEMA_PROPERTY + } )); void editJoinColumn(JoinColumn joinColumn) { diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TableComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TableComposite.java index 1f575a22c6..9e77780cac 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TableComposite.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TableComposite.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Oracle. All rights reserved. + * Copyright (c) 2007, 2015 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -13,6 +13,7 @@ import java.util.Arrays; import java.util.Collection; import org.eclipse.jpt.common.ui.internal.widgets.Pane; import org.eclipse.jpt.common.utility.internal.ArrayTools; +import org.eclipse.jpt.common.utility.internal.StringTools; import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapter; import org.eclipse.jpt.common.utility.model.value.ModifiablePropertyValueModel; import org.eclipse.jpt.common.utility.model.value.PropertyValueModel; @@ -265,8 +266,10 @@ public class TableComposite extends Pane<Entity> }; } - /* CU private */ static final Collection<String> TABLE_PICK_LIST_PROPERTIES = Arrays.asList(ArrayTools.addAll(SCHEMA_PICK_LIST_PROPERTIES.toArray(new String[0]), - Table.DEFAULT_SCHEMA_PROPERTY, - Table.SPECIFIED_SCHEMA_PROPERTY + /* CU private */ static final Collection<String> TABLE_PICK_LIST_PROPERTIES = Arrays.asList(ArrayTools.addAll(SCHEMA_PICK_LIST_PROPERTIES.toArray(StringTools.EMPTY_STRING_ARRAY), + new String[] { + Table.DEFAULT_SCHEMA_PROPERTY, + Table.SPECIFIED_SCHEMA_PROPERTY + } )); } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TableGeneratorComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TableGeneratorComposite.java index d6b5f110fa..c14b143e70 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TableGeneratorComposite.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TableGeneratorComposite.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Oracle. All rights reserved. + * Copyright (c) 2007, 2015 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -13,6 +13,7 @@ import java.util.Arrays; import java.util.Collection; import org.eclipse.jpt.common.ui.internal.widgets.Pane; import org.eclipse.jpt.common.utility.internal.ArrayTools; +import org.eclipse.jpt.common.utility.internal.StringTools; import org.eclipse.jpt.common.utility.model.value.PropertyValueModel; import org.eclipse.jpt.jpa.core.JpaProject; import org.eclipse.jpt.jpa.core.context.GeneratorContainer; @@ -498,13 +499,17 @@ public class TableGeneratorComposite extends GeneratorComposite<TableGenerator> TableGenerator.SPECIFIED_CATALOG_PROPERTY }); - /* CU private */ static final Collection<String> TABLE_PICK_LIST_PROPERTIES = Arrays.asList(ArrayTools.addAll(SCHEMA_PICK_LIST_PROPERTIES.toArray(new String[0]), - TableGenerator.DEFAULT_SCHEMA_PROPERTY, - TableGenerator.SPECIFIED_SCHEMA_PROPERTY + /* CU private */ static final Collection<String> TABLE_PICK_LIST_PROPERTIES = Arrays.asList(ArrayTools.addAll(SCHEMA_PICK_LIST_PROPERTIES.toArray(StringTools.EMPTY_STRING_ARRAY), + new String[] { + TableGenerator.DEFAULT_SCHEMA_PROPERTY, + TableGenerator.SPECIFIED_SCHEMA_PROPERTY + } )); - /* CU private */ static final Collection<String> COLUMN_PICK_LIST_PROPERTIES = Arrays.asList(ArrayTools.addAll(TABLE_PICK_LIST_PROPERTIES.toArray(new String[0]), - TableGenerator.DEFAULT_TABLE_NAME_PROPERTY, - TableGenerator.SPECIFIED_TABLE_NAME_PROPERTY + /* CU private */ static final Collection<String> COLUMN_PICK_LIST_PROPERTIES = Arrays.asList(ArrayTools.addAll(TABLE_PICK_LIST_PROPERTIES.toArray(StringTools.EMPTY_STRING_ARRAY), + new String[] { + TableGenerator.DEFAULT_TABLE_NAME_PROPERTY, + TableGenerator.SPECIFIED_TABLE_NAME_PROPERTY + } )); } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/SequenceGeneratorComposite2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/SequenceGeneratorComposite2_0.java index 808b240802..4938b281a0 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/SequenceGeneratorComposite2_0.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/SequenceGeneratorComposite2_0.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2013 Oracle. All rights reserved. + * Copyright (c) 2009, 2015 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -13,6 +13,7 @@ import java.util.Arrays; import java.util.Collection; import org.eclipse.jpt.common.ui.internal.widgets.Pane; import org.eclipse.jpt.common.utility.internal.ArrayTools; +import org.eclipse.jpt.common.utility.internal.StringTools; import org.eclipse.jpt.common.utility.model.value.PropertyValueModel; import org.eclipse.jpt.jpa.core.JpaProject; import org.eclipse.jpt.jpa.core.context.SequenceGenerator; @@ -207,8 +208,10 @@ public class SequenceGeneratorComposite2_0 extends SequenceGeneratorComposite } } - /* CU private */ static final Collection<String> SEQUENCE_PICK_LIST_PROPERTIES = Arrays.asList(ArrayTools.addAll(SCHEMA_PICK_LIST_PROPERTIES.toArray(new String[0]), - SequenceGenerator2_0.DEFAULT_SCHEMA_PROPERTY, - SequenceGenerator2_0.SPECIFIED_SCHEMA_PROPERTY + /* CU private */ static final Collection<String> SEQUENCE_PICK_LIST_PROPERTIES = Arrays.asList(ArrayTools.addAll(SCHEMA_PICK_LIST_PROPERTIES.toArray(StringTools.EMPTY_STRING_ARRAY), + new String[] { + SequenceGenerator2_0.DEFAULT_SCHEMA_PROPERTY, + SequenceGenerator2_0.SPECIFIED_SCHEMA_PROPERTY + } )); } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/JpaFacetInstallPage.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/JpaFacetInstallPage.java index 932fd8fe5e..0b0396c59a 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/JpaFacetInstallPage.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/JpaFacetInstallPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Oracle. All rights reserved. + * Copyright (c) 2007, 2015 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -60,10 +60,12 @@ public class JpaFacetInstallPage @Override protected String[] getValidationPropertyNames() { String[] validationPropertyNames = super.getValidationPropertyNames(); - return ArrayTools.addAll( - validationPropertyNames, - USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH, - DB_DRIVER_NAME); + return ArrayTools.addAll(validationPropertyNames, + new String[] { + USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH, + DB_DRIVER_NAME + } + ); } |