SF 1650134 change to putVariant() api
This commit is contained in:
@@ -361,12 +361,18 @@ public class Variant extends JacobObject {
|
|||||||
*
|
*
|
||||||
* @throws IllegalArgumentException
|
* @throws IllegalArgumentException
|
||||||
* if inVariant = null
|
* if inVariant = null
|
||||||
* @param inVariant A variant that is to be referenced by this variant
|
* @param objectToBeWrapped A object that is to be referenced by this variant.
|
||||||
|
* If objectToBeWrapped is already of type Variant, then it is used.
|
||||||
|
* If objectToBeWrapped is not Variant then <code>new Variant(objectToBeWrapped)</code>
|
||||||
|
* is called and the result is passed into the com layer
|
||||||
*/
|
*/
|
||||||
public void putVariant(Variant inVariant) {
|
public void putVariant(Object objectToBeWrapped) {
|
||||||
if (inVariant == null) {
|
if (objectToBeWrapped == null) {
|
||||||
throw new IllegalArgumentException("Cannot put null in as a variant");
|
throw new IllegalArgumentException("Cannot put null in as a variant");
|
||||||
|
} else if (objectToBeWrapped instanceof Variant){
|
||||||
|
putVariantVariant((Variant)objectToBeWrapped);
|
||||||
} else {
|
} else {
|
||||||
|
Variant inVariant = new Variant(objectToBeWrapped);
|
||||||
putVariantVariant(inVariant);
|
putVariantVariant(inVariant);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user