StringArgs.java revision 1088:7e62d98d4625
1139823Simp/* 275374Sbp * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. 375374Sbp * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 475374Sbp * 575374Sbp * This code is free software; you can redistribute it and/or modify it 675374Sbp * under the terms of the GNU General Public License version 2 only, as 775374Sbp * published by the Free Software Foundation. Oracle designates this 875374Sbp * particular file as subject to the "Classpath" exception as provided 975374Sbp * by Oracle in the LICENSE file that accompanied this code. 1075374Sbp * 1175374Sbp * This code is distributed in the hope that it will be useful, but WITHOUT 1275374Sbp * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1375374Sbp * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1475374Sbp * version 2 for more details (a copy is included in the LICENSE file that 1575374Sbp * accompanied this code). 1675374Sbp * 1775374Sbp * You should have received a copy of the GNU General Public License version 1875374Sbp * 2 along with this work; if not, write to the Free Software Foundation, 1975374Sbp * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2075374Sbp * 2175374Sbp * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2275374Sbp * or visit www.oracle.com if you need additional information or have any 2375374Sbp * questions. 2475374Sbp */ 2575374Sbp 26116189Sobrienpackage jdk.nashorn.test.models; 27116189Sobrien 28116189Sobrienimport java.util.List; 29116189Sobrien 3075374Sbp@SuppressWarnings("javadoc") 3175374Sbppublic class StringArgs { 32263233Srwatson 33129880Sphk public static void checkString(final List<?> list) { 3475374Sbp for (final Object s : list) { 3576166Smarkm if (!(s instanceof String)) { 3676166Smarkm throw new AssertionError("Not a String: " + s); 3775374Sbp } 3876166Smarkm } 3975374Sbp } 4076166Smarkm} 41108524Salfred