langtools/test/tools/javac/synthesize/Test.java
author mikejwre
Wed, 09 Jun 2010 18:56:41 -0700
changeset 5634 895b66935810
parent 5520 86e4b9a9da40
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1037
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
     1
/*
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1264
diff changeset
     2
 * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
1037
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
     4
 *
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
     7
 * published by the Free Software Foundation.
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
     8
 *
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    13
 * accompanied this code).
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    14
 *
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    18
 *
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1264
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1264
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1264
diff changeset
    21
 * questions.
1037
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    22
 */
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    23
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    24
// This code (indirectly) requires the presence of
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    25
// Cloneable and Serializable (supertypes for Java arrays)
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    26
// Double and Float (for boxing/unboxing)
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    27
public class Test
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    28
{
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    29
    Object f(boolean b, int[] array) {
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    30
        return b ? array : 2;
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    31
    }
c6b315a34dc6 6627362: javac generates code that uses array.clone, which is not available on JavaCard
jjg
parents:
diff changeset
    32
}