# HG changeset patch # User attila # Date 1408116649 -7200 # Node ID b32ccc3a76c9283645b0bf2683b600e3c7174949 # Parent 0665ee3822e0337d558632c96083d9f08f387681 8055199: Tidy up Nashorn codebase for code standards (August 2014) Reviewed-by: hannesw, lagergren diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/docs/genshelldoc.js --- a/nashorn/docs/genshelldoc.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/docs/genshelldoc.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * 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. @@ -61,7 +61,7 @@ for each (opt in Options.validOptions) { -var isTimezone = (opt.type == "timezone"); +var isTimezone = (opt.type == "timezone"); var defValue = opt.defaultValue; if (defValue == null) { defValue = "<none>"; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/docs/source/importpackageclass.js --- a/nashorn/docs/source/importpackageclass.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/docs/source/importpackageclass.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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 Oracle 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 @@ -32,7 +32,7 @@ // load compatibility script load("nashorn:mozilla_compat.js"); -// Import Java packages and classes +// Import Java packages and classes // like import package.*; in Java importPackage(java.awt); // like import java.awt.Frame in Java diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/docs/source/javaarray.js --- a/nashorn/docs/source/javaarray.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/docs/source/javaarray.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/docs/source/javaextend.js --- a/nashorn/docs/source/javaextend.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/docs/source/javaextend.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/docs/source/javaimporter.js --- a/nashorn/docs/source/javaimporter.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/docs/source/javaimporter.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/docs/source/javatypes.js --- a/nashorn/docs/source/javatypes.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/docs/source/javatypes.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/docs/source/overload.js --- a/nashorn/docs/source/overload.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/docs/source/overload.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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 Oracle 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 @@ -31,6 +31,6 @@ var out = java.lang.System.out; -// select a particular print function +// select a particular print function out["println(java.lang.Object)"]("hello"); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/docs/source/runnable.js --- a/nashorn/docs/source/runnable.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/docs/source/runnable.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/docs/source/samfunc.js --- a/nashorn/docs/source/samfunc.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/docs/source/samfunc.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/docs/source/test.js --- a/nashorn/docs/source/test.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/docs/source/test.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/array_mapreduce.js --- a/nashorn/samples/array_mapreduce.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/array_mapreduce.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -31,9 +31,9 @@ // Usage: jjs array_mapreduce.js -// Many Array.prototype functions such as map, +// Many Array.prototype functions such as map, // filter, reduce, reduceRight, every, some are generic. -// These functions accept ECMAScript array as well as +// These functions accept ECMAScript array as well as // many array-like objects including java arrays. // So, you can do map/filter/reduce with Java streams or // you can also use Array.prototype functions as below. @@ -73,6 +73,6 @@ // print sum of squares of the random numbers print("Square sum:", reduce.call( - map.call(jarr, function(x) x*x), + map.call(jarr, function(x) x*x), function(x, y) x + y) ); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/astviewer.js --- a/nashorn/samples/astviewer.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/astviewer.js Fri Aug 15 17:30:49 2014 +0200 @@ -2,22 +2,22 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -82,7 +82,7 @@ // load parser.js from nashorn resources load("nashorn:parser.js"); -// read the full content of the file and parse it +// read the full content of the file and parse it // to get AST of the script specified var ast = parse(readFully(sourceName)); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/barchart_weather.js --- a/nashorn/samples/barchart_weather.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/barchart_weather.js Fri Aug 15 17:30:49 2014 +0200 @@ -2,22 +2,22 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/call_lambda.js --- a/nashorn/samples/call_lambda.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/call_lambda.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/counters.js --- a/nashorn/samples/counters.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/counters.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/dirname.js --- a/nashorn/samples/dirname.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/dirname.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/disassemble.js --- a/nashorn/samples/disassemble.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/disassemble.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -33,7 +33,7 @@ // Simple .class disassembler that uses bundled ObjectWeb ASM // classes in jdk8. WARNING: Bundled ObjectWeb ASM classes are -// not part of official jdk8 API. It can be changed/removed +// not part of official jdk8 API. It can be changed/removed // without notice. So, this script is brittle by design! // This example demonstrates passing arguments to script diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/engine/accessvar.js --- a/nashorn/samples/engine/accessvar.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/engine/accessvar.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/engine/callfunc.js --- a/nashorn/samples/engine/callfunc.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/engine/callfunc.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -29,7 +29,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -// simple example showing how to call a global script +// simple example showing how to call a global script // function from caller var ScriptEngineManager = Java.type("javax.script.ScriptEngineManager"); @@ -42,7 +42,7 @@ engine.eval("function func(name) { print('I am func, hello ' + name) }"); // invoke functions, methods of code evaluated by engine -// from javax.script.Invocable interface. But, hey, +// from javax.script.Invocable interface. But, hey, // calling code is JavaScript and don't worry about types :) engine.invokeFunction("func", "Nashorn"); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/engine/callmethod.js --- a/nashorn/samples/engine/callmethod.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/engine/callmethod.js Fri Aug 15 17:30:49 2014 +0200 @@ -2,22 +2,22 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -55,7 +55,7 @@ CODE); // invoke methods of an object in script world -// from javax.script.Invocable interface. But, hey, +// from javax.script.Invocable interface. But, hey, // calling code is JavaScript and don't worry about types :) // get that script object on which to call a method diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/engine/exposevar.js --- a/nashorn/samples/engine/exposevar.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/engine/exposevar.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/engine/foreignobject.js --- a/nashorn/samples/engine/foreignobject.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/engine/foreignobject.js Fri Aug 15 17:30:49 2014 +0200 @@ -2,22 +2,22 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -54,7 +54,7 @@ // the class jdk.nashorn.api.scripting.ScriptObjectMirror // But nashorn's dynalink linker can treat these objects // specially to support natural script syntax to access.. -// In Java code, you need to use ScriptObjectMirror's +// In Java code, you need to use ScriptObjectMirror's // methods though. Once again, script world is simpler :-) var foreignObj = engine.get("obj"); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/engine/hello.js --- a/nashorn/samples/engine/hello.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/engine/hello.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/engine/interface.js --- a/nashorn/samples/engine/interface.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/engine/interface.js Fri Aug 15 17:30:49 2014 +0200 @@ -2,22 +2,22 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -50,7 +50,7 @@ // create Java interface object whose methods are // implemented by script functions. This is from -// javax.script.Invocable. But we are in JS world, +// javax.script.Invocable. But we are in JS world, // don't worry about types :) var Runnable = Java.type("java.lang.Runnable"); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/engine/interface2.js --- a/nashorn/samples/engine/interface2.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/engine/interface2.js Fri Aug 15 17:30:49 2014 +0200 @@ -2,22 +2,22 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/engine/lambda_as_func.js --- a/nashorn/samples/engine/lambda_as_func.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/engine/lambda_as_func.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/env.js --- a/nashorn/samples/env.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/env.js Fri Aug 15 17:30:49 2014 +0200 @@ -2,22 +2,22 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -31,8 +31,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -// In nashorn -scripting mode, -// "$ENV" object exposes process +// In nashorn -scripting mode, +// "$ENV" object exposes process // environment variables print($ENV.PATH); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/expression_closure.js --- a/nashorn/samples/expression_closure.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/expression_closure.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/filebrowser.js --- a/nashorn/samples/filebrowser.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/filebrowser.js Fri Aug 15 17:30:49 2014 +0200 @@ -2,22 +2,22 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/fileline.js --- a/nashorn/samples/fileline.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/fileline.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/fizzbuzz.js --- a/nashorn/samples/fizzbuzz.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/fizzbuzz.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/for_each.js --- a/nashorn/samples/for_each.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/for_each.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -42,7 +42,7 @@ var arr = new JArray(10); // store squares as values -for (i in arr) +for (i in arr) arr[i] = i*i; // for .. each on java arrays @@ -57,7 +57,7 @@ print("System properties"); for each (p in System.properties.entrySet()) { print(p.key, "=", p.value); -} +} // print process environment vars as name = value pairs print("Process environment"); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/gaussian_random.js --- a/nashorn/samples/gaussian_random.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/gaussian_random.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -37,7 +37,7 @@ var r = new Random(); // expression closure (see expression_closure.js as well) -// passed as lambda double generator. "print" passed as +// passed as lambda double generator. "print" passed as // double consumer lambda to 'forEach' method. DoubleStream diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/gaussian_random_bind.js --- a/nashorn/samples/gaussian_random_bind.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/gaussian_random_bind.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -34,7 +34,7 @@ var Random = Java.type("java.util.Random"); var DoubleStream = Java.type("java.util.stream.DoubleStream"); -// function as lambda double generator. "print" passed as +// function as lambda double generator. "print" passed as // double consumer lambda to 'forEach' method. // Function.prototype.bind used to attach 'state' for the // generator function. diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/gutenberg.js --- a/nashorn/samples/gutenberg.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/gutenberg.js Fri Aug 15 17:30:49 2014 +0200 @@ -2,22 +2,22 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -69,7 +69,7 @@ // capture title, description now inItem = true; } - + if (inItem) { switch (local) { case 'title': diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/heredoc.js --- a/nashorn/samples/heredoc.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/heredoc.js Fri Aug 15 17:30:49 2014 +0200 @@ -2,22 +2,22 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -38,14 +38,14 @@ var sender = "Buffy the Vampire Slayer"; var recipient = "Spike"; - + print(<"); exit(1); } - + // Java types used var File = Java.type("java.io.File"); var Files = Java.type("java.nio.file.Files"); @@ -48,7 +48,7 @@ var Tree = Java.type("com.sun.source.tree.Tree"); var TreeScanner = Java.type("com.sun.source.util.TreeScanner"); var VariableTree = Java.type("com.sun.source.tree.VariableTree"); - + // count "foo"-s in the given .java files function countFoo() { // get the system compiler tool @@ -63,7 +63,7 @@ // subclass SimpleTreeVisitor - to count variables called "foo" var FooCounterVisitor = Java.extend(TreeScanner); var fooCount = 0; - + var visitor = new FooCounterVisitor() { visitVariable: function (node, p) { if (node.name.toString() == "foo") { @@ -71,13 +71,13 @@ } } } - + for each (var cu in task.parse()) { cu.accept(visitor, null); } return fooCount; } - + // for each ".java" file in directory (recursively) count "foo". function main(dir) { var totalCount = 0; @@ -99,5 +99,5 @@ }); print("Total foo count: " + totalCount); } - + main(new File(arguments[0])); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/javaimporter.js --- a/nashorn/samples/javaimporter.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/javaimporter.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -34,14 +34,14 @@ function readTextFromURL(url) { - // equivalent to - // + // equivalent to + // // import java.io.*; // import java.net.*; // import java.lang.StringBuffer; // // only inside the 'with' statement - with (new JavaImporter(java.io, + with (new JavaImporter(java.io, java.net, java.lang.StringBuilder)) { var buf = new StringBuilder(); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/javalist.js --- a/nashorn/samples/javalist.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/javalist.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/javamap.js --- a/nashorn/samples/javamap.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/javamap.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -45,7 +45,7 @@ print(map['js']); print(map.js); -// also assign new key-value pair +// also assign new key-value pair // as 'property-value' map['language'] = 'java'; print(map.get("language")); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/javashell.js --- a/nashorn/samples/javashell.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/javashell.js Fri Aug 15 17:30:49 2014 +0200 @@ -2,22 +2,22 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -130,7 +130,7 @@ // generate unique name function uniqueName() { var now = LocalDateTime.now().toString(); - // replace unsafe chars with '_' + // replace unsafe chars with '_' return "JavaShell" + now.replace(/-|:|\./g, '_'); } diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/jsadapter_dom.js --- a/nashorn/samples/jsadapter_dom.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/jsadapter_dom.js Fri Aug 15 17:30:49 2014 +0200 @@ -2,22 +2,22 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -33,7 +33,7 @@ // Simple example that demonstrates reading XML Rss feed // to generate a HTML file from script and show it by browser -// Uses XML DOM parser and DOM element wrapped by script +// Uses XML DOM parser and DOM element wrapped by script // "proxy" (JSAdapter constructor) // Java classes used @@ -78,7 +78,7 @@ var node = nodeList.item(i); if (node.nodeType == TEXT_NODE) { text += node.nodeValue; - } + } } return text; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/jsobj_example.js --- a/nashorn/samples/jsobj_example.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/jsobj_example.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -33,7 +33,7 @@ var AbstractJSObject = Java.type("jdk.nashorn.api.scripting.AbstractJSObject"); -// JSObject example that uses a map for properties and +// JSObject example that uses a map for properties and // falls back to with methods on a java object (for missing // properties @@ -49,7 +49,7 @@ return function() { var a = arguments; switch (a.length) { - case 0: return fallback[name](); + case 0: return fallback[name](); case 1: return fallback[name](a[0]); case 2: return fallback[name](a[0], a[1]); case 3: return fallback[name](a[0], a[1], a[2]); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/jsobject.js --- a/nashorn/samples/jsobject.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/jsobject.js Fri Aug 15 17:30:49 2014 +0200 @@ -2,22 +2,22 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/jsobject_mapreduce.js --- a/nashorn/samples/jsobject_mapreduce.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/jsobject_mapreduce.js Fri Aug 15 17:30:49 2014 +0200 @@ -2,22 +2,22 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -31,9 +31,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -// Many Array.prototype functions such as map, +// Many Array.prototype functions such as map, // filter, reduce, reduceRight, every, some are generic. -// These functions accept ECMAScript array as well as +// These functions accept ECMAScript array as well as // many array-like objects including JSObjects. // See also http://en.wikipedia.org/wiki/MapReduce @@ -57,6 +57,6 @@ // print sum of squares of the random numbers print("Square sum:", reduce.call( - map.call(buf, function(x) x*x), + map.call(buf, function(x) x*x), function(x, y) x + y) ); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/jsonviewer.js --- a/nashorn/samples/jsonviewer.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/jsonviewer.js Fri Aug 15 17:30:49 2014 +0200 @@ -4,22 +4,22 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -52,8 +52,8 @@ // read text content of a URL function readTextFromURL(url) { - // equivalent to - // + // equivalent to + // // import java.io.*; // import java.net.*; // import java.lang.StringBuffer; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/letter.js --- a/nashorn/samples/letter.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/letter.js Fri Aug 15 17:30:49 2014 +0200 @@ -2,22 +2,22 @@ /* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. 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 Oracle 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 @@ -43,7 +43,7 @@ // JavaScript style line comment is ok too. print(< (stack.js:52) +// at g (stack.js:37) +// at f (stack.js:41) +// at (stack.js:52) try { f(); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/uniform_random.js --- a/nashorn/samples/uniform_random.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/uniform_random.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/uniq.js --- a/nashorn/samples/uniq.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/uniq.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/uniqs.js --- a/nashorn/samples/uniqs.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/uniqs.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 @@ -31,7 +31,7 @@ // Usage: jjs uniqs.js -- // omit repeated lines and print unique lines -// But this version uses Stream API +// But this version uses Stream API if (arguments.length < 1) { print("Usage: jjs uniqs.js -- "); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/weather.js --- a/nashorn/samples/weather.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/weather.js Fri Aug 15 17:30:49 2014 +0200 @@ -2,22 +2,22 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/word_histogram.js --- a/nashorn/samples/word_histogram.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/word_histogram.js Fri Aug 15 17:30:49 2014 +0200 @@ -2,22 +2,22 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/zipfs.js --- a/nashorn/samples/zipfs.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/zipfs.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/samples/ziplist.js --- a/nashorn/samples/ziplist.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/samples/ziplist.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. 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 Oracle 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 diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngine.java --- a/nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngine.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngine.java Fri Aug 15 17:30:49 2014 +0200 @@ -40,7 +40,6 @@ import java.text.MessageFormat; import java.util.Locale; import java.util.ResourceBundle; - import javax.script.AbstractScriptEngine; import javax.script.Bindings; import javax.script.Compilable; @@ -51,7 +50,6 @@ import javax.script.ScriptEngineFactory; import javax.script.ScriptException; import javax.script.SimpleBindings; - import jdk.nashorn.internal.objects.Global; import jdk.nashorn.internal.runtime.Context; import jdk.nashorn.internal.runtime.ErrorManager; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java --- a/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java Fri Aug 15 17:30:49 2014 +0200 @@ -56,7 +56,6 @@ import static jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.CALLSITE_OPTIMISTIC; import static jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.CALLSITE_PROGRAM_POINT_SHIFT; import static jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.CALLSITE_SCOPE; -import static jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.CALLSITE_STRICT; import java.io.PrintWriter; import java.util.ArrayDeque; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/codegen/CompilationPhase.java --- a/nashorn/src/jdk/nashorn/internal/codegen/CompilationPhase.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/codegen/CompilationPhase.java Fri Aug 15 17:30:49 2014 +0200 @@ -333,7 +333,7 @@ if (phases.isRestOfCompilation()) { sb.append("$restOf"); } - CompileUnit newUnit = compiler.createCompileUnit(sb.toString(), oldUnit.getWeight()); + final CompileUnit newUnit = compiler.createCompileUnit(sb.toString(), oldUnit.getWeight()); log.fine("Creating new compile unit ", oldUnit, " => ", newUnit); map.put(oldUnit, newUnit); assert newUnit != null; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/codegen/CompileUnit.java --- a/nashorn/src/jdk/nashorn/internal/codegen/CompileUnit.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/codegen/CompileUnit.java Fri Aug 15 17:30:49 2014 +0200 @@ -25,12 +25,8 @@ package jdk.nashorn.internal.codegen; -import java.util.Collections; -import java.util.LinkedHashSet; import java.util.Set; import java.util.TreeSet; -import jdk.nashorn.internal.ir.FunctionNode; -import jdk.nashorn.internal.runtime.RecompilableScriptFunctionData; /** * Used to track split class compilation. diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/codegen/Lower.java --- a/nashorn/src/jdk/nashorn/internal/codegen/Lower.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/codegen/Lower.java Fri Aug 15 17:30:49 2014 +0200 @@ -34,7 +34,6 @@ import java.util.Collections; import java.util.List; import java.util.ListIterator; - import jdk.nashorn.internal.ir.BaseNode; import jdk.nashorn.internal.ir.BinaryNode; import jdk.nashorn.internal.ir.Block; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java --- a/nashorn/src/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java Fri Aug 15 17:30:49 2014 +0200 @@ -40,8 +40,6 @@ import java.util.Base64; import java.util.Date; import java.util.Map; -import java.util.TreeMap; - import jdk.nashorn.internal.codegen.types.Type; import jdk.nashorn.internal.runtime.Context; import jdk.nashorn.internal.runtime.RecompilableScriptFunctionData; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/codegen/types/Type.java --- a/nashorn/src/jdk/nashorn/internal/codegen/types/Type.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/codegen/types/Type.java Fri Aug 15 17:30:49 2014 +0200 @@ -301,12 +301,12 @@ * @param output data output * @throws IOException */ - public static void writeTypeMap(Map typeMap, final DataOutput output) throws IOException { + public static void writeTypeMap(final Map typeMap, final DataOutput output) throws IOException { if (typeMap == null) { output.writeInt(0); } else { output.writeInt(typeMap.size()); - for(Map.Entry e: typeMap.entrySet()) { + for(final Map.Entry e: typeMap.entrySet()) { output.writeInt(e.getKey()); final byte typeChar; final Type type = e.getValue(); @@ -331,7 +331,7 @@ * @return type map * @throws IOException */ - public static Map readTypeMap(DataInput input) throws IOException { + public static Map readTypeMap(final DataInput input) throws IOException { final int size = input.readInt(); if (size == 0) { return null; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/ir/CallNode.java --- a/nashorn/src/jdk/nashorn/internal/ir/CallNode.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/ir/CallNode.java Fri Aug 15 17:30:49 2014 +0200 @@ -30,7 +30,6 @@ import java.util.Collections; import java.util.List; import java.util.function.Function; - import jdk.nashorn.internal.codegen.types.Type; import jdk.nashorn.internal.ir.annotations.Ignore; import jdk.nashorn.internal.ir.annotations.Immutable; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/ir/FunctionNode.java --- a/nashorn/src/jdk/nashorn/internal/ir/FunctionNode.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/ir/FunctionNode.java Fri Aug 15 17:30:49 2014 +0200 @@ -25,7 +25,12 @@ package jdk.nashorn.internal.ir; -import static jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.*; +import static jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.CALLSITE_PROFILE; +import static jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.CALLSITE_STRICT; +import static jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.CALLSITE_TRACE; +import static jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.CALLSITE_TRACE_ENTEREXIT; +import static jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.CALLSITE_TRACE_MISSES; +import static jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.CALLSITE_TRACE_VALUES; import java.util.Collections; import java.util.EnumSet; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/ir/LexicalContext.java --- a/nashorn/src/jdk/nashorn/internal/ir/LexicalContext.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/ir/LexicalContext.java Fri Aug 15 17:30:49 2014 +0200 @@ -27,7 +27,6 @@ import java.io.File; import java.util.Iterator; import java.util.NoSuchElementException; - import jdk.nashorn.internal.runtime.Debug; import jdk.nashorn.internal.runtime.Source; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/ir/LiteralNode.java --- a/nashorn/src/jdk/nashorn/internal/ir/LiteralNode.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/ir/LiteralNode.java Fri Aug 15 17:30:49 2014 +0200 @@ -29,7 +29,6 @@ import java.util.Collections; import java.util.List; import java.util.function.Function; - import jdk.nashorn.internal.codegen.CompileUnit; import jdk.nashorn.internal.codegen.types.ArrayType; import jdk.nashorn.internal.codegen.types.Type; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/ir/Node.java --- a/nashorn/src/jdk/nashorn/internal/ir/Node.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/ir/Node.java Fri Aug 15 17:30:49 2014 +0200 @@ -27,7 +27,6 @@ import java.util.ArrayList; import java.util.List; - import jdk.nashorn.internal.ir.visitor.NodeVisitor; import jdk.nashorn.internal.parser.Token; import jdk.nashorn.internal.parser.TokenType; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/ir/debug/NashornTextifier.java --- a/nashorn/src/jdk/nashorn/internal/ir/debug/NashornTextifier.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/ir/debug/NashornTextifier.java Fri Aug 15 17:30:49 2014 +0200 @@ -39,7 +39,6 @@ import java.util.List; import java.util.Map; import java.util.Set; - import jdk.internal.org.objectweb.asm.Attribute; import jdk.internal.org.objectweb.asm.Handle; import jdk.internal.org.objectweb.asm.Label; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/objects/Global.java --- a/nashorn/src/jdk/nashorn/internal/objects/Global.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/objects/Global.java Fri Aug 15 17:30:49 2014 +0200 @@ -46,10 +46,8 @@ import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicReference; - import javax.script.ScriptContext; import javax.script.ScriptEngine; - import jdk.internal.dynalink.linker.GuardedInvocation; import jdk.internal.dynalink.linker.LinkRequest; import jdk.nashorn.api.scripting.ScriptObjectMirror; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/objects/NativeJava.java --- a/nashorn/src/jdk/nashorn/internal/objects/NativeJava.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeJava.java Fri Aug 15 17:30:49 2014 +0200 @@ -45,8 +45,8 @@ import jdk.nashorn.internal.runtime.JSType; import jdk.nashorn.internal.runtime.ListAdapter; import jdk.nashorn.internal.runtime.PropertyMap; +import jdk.nashorn.internal.runtime.ScriptFunction; import jdk.nashorn.internal.runtime.ScriptObject; -import jdk.nashorn.internal.runtime.ScriptFunction; import jdk.nashorn.internal.runtime.ScriptRuntime; import jdk.nashorn.internal.runtime.linker.Bootstrap; import jdk.nashorn.internal.runtime.linker.JavaAdapterFactory; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/objects/NativeObject.java --- a/nashorn/src/jdk/nashorn/internal/objects/NativeObject.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeObject.java Fri Aug 15 17:30:49 2014 +0200 @@ -39,7 +39,6 @@ import java.util.List; import java.util.Set; import java.util.concurrent.Callable; - import jdk.internal.dynalink.beans.BeansLinker; import jdk.internal.dynalink.beans.StaticClass; import jdk.internal.dynalink.linker.GuardedInvocation; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/runtime/CodeStore.java --- a/nashorn/src/jdk/nashorn/internal/runtime/CodeStore.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/runtime/CodeStore.java Fri Aug 15 17:30:49 2014 +0200 @@ -25,11 +25,6 @@ package jdk.nashorn.internal.runtime; -import jdk.nashorn.internal.codegen.types.Type; -import jdk.nashorn.internal.runtime.logging.DebugLogger; -import jdk.nashorn.internal.runtime.logging.Loggable; -import jdk.nashorn.internal.runtime.logging.Logger; - import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; @@ -43,6 +38,10 @@ import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; import java.util.Map; +import jdk.nashorn.internal.codegen.types.Type; +import jdk.nashorn.internal.runtime.logging.DebugLogger; +import jdk.nashorn.internal.runtime.logging.Loggable; +import jdk.nashorn.internal.runtime.logging.Logger; /** * A code cache for persistent caching of compiled scripts. @@ -78,7 +77,7 @@ } @Override - public DebugLogger initLogger(Context context) { + public DebugLogger initLogger(final Context context) { return context.getLogger(getClass()); } diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/runtime/CompiledFunction.java --- a/nashorn/src/jdk/nashorn/internal/runtime/CompiledFunction.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/runtime/CompiledFunction.java Fri Aug 15 17:30:49 2014 +0200 @@ -532,7 +532,7 @@ // after we grabbed it here, in which case we'll indeed do one busy relink immediately. try { wait(); - } catch (InterruptedException e) { + } catch (final InterruptedException e) { // Intentionally ignored. There's nothing meaningful we can do if we're interrupted } } else { diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/runtime/ConsString.java --- a/nashorn/src/jdk/nashorn/internal/runtime/ConsString.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/runtime/ConsString.java Fri Aug 15 17:30:49 2014 +0200 @@ -91,14 +91,14 @@ return new CharSequence[] { left, right }; } - private CharSequence flattened(boolean flattenNested) { + private CharSequence flattened(final boolean flattenNested) { if (state != STATE_FLATTENED) { flatten(flattenNested); } return left; } - private synchronized void flatten(boolean flattenNested) { + private synchronized void flatten(final boolean flattenNested) { // We use iterative traversal as recursion may exceed the stack size limit. final char[] chars = new char[length]; int pos = length; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/runtime/Context.java --- a/nashorn/src/jdk/nashorn/internal/runtime/Context.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/runtime/Context.java Fri Aug 15 17:30:49 2014 +0200 @@ -214,7 +214,7 @@ @Override public void storeScript(final String classInfoFile, final Source source, final String mainClassName, - final Map classBytes, Map initializers, + final Map classBytes, final Map initializers, final Object[] constants, final int compilationId) { if (context.codeStore != null) { context.codeStore.storeScript(classInfoFile, source, mainClassName, classBytes, initializers, constants, compilationId); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/runtime/ECMAErrors.java --- a/nashorn/src/jdk/nashorn/internal/runtime/ECMAErrors.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/runtime/ECMAErrors.java Fri Aug 15 17:30:49 2014 +0200 @@ -28,7 +28,6 @@ import java.text.MessageFormat; import java.util.Locale; import java.util.ResourceBundle; - import jdk.nashorn.internal.codegen.CompilerConstants; import jdk.nashorn.internal.objects.Global; import jdk.nashorn.internal.scripts.JS; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/runtime/FunctionInitializer.java --- a/nashorn/src/jdk/nashorn/internal/runtime/FunctionInitializer.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/runtime/FunctionInitializer.java Fri Aug 15 17:30:49 2014 +0200 @@ -25,18 +25,16 @@ package jdk.nashorn.internal.runtime; -import jdk.nashorn.internal.codegen.CompileUnit; -import jdk.nashorn.internal.codegen.FunctionSignature; -import jdk.nashorn.internal.codegen.types.Type; -import jdk.nashorn.internal.ir.FunctionNode; - import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.lang.invoke.MethodType; import java.util.Map; -import java.util.TreeMap; +import jdk.nashorn.internal.codegen.CompileUnit; +import jdk.nashorn.internal.codegen.FunctionSignature; +import jdk.nashorn.internal.codegen.types.Type; +import jdk.nashorn.internal.ir.FunctionNode; /** * Class that contains information allowing us to look up a method handle implementing a JavaScript function @@ -121,7 +119,7 @@ * Set the class implementing the function * @param code the class */ - public void setCode(Class code) { + public void setCode(final Class code) { // Make sure code has not been set and has expected class name if (this.code != null) { throw new IllegalStateException("code already set"); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/runtime/NativeJavaPackage.java --- a/nashorn/src/jdk/nashorn/internal/runtime/NativeJavaPackage.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/runtime/NativeJavaPackage.java Fri Aug 15 17:30:49 2014 +0200 @@ -25,8 +25,8 @@ package jdk.nashorn.internal.runtime; +import static jdk.nashorn.internal.runtime.ECMAErrors.typeError; import static jdk.nashorn.internal.runtime.UnwarrantedOptimismException.isValid; -import static jdk.nashorn.internal.runtime.ECMAErrors.typeError; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java --- a/nashorn/src/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java Fri Aug 15 17:30:49 2014 +0200 @@ -37,7 +37,6 @@ import java.util.Map; import java.util.Set; import java.util.TreeMap; - import jdk.internal.dynalink.support.NameCodec; import jdk.nashorn.internal.codegen.Compiler; import jdk.nashorn.internal.codegen.Compiler.CompilationPhases; @@ -489,7 +488,7 @@ assert initializers.size() == 1; final FunctionInitializer initializer = initializers.values().iterator().next(); - Object[] constants = script.getConstants(); + final Object[] constants = script.getConstants(); for (int i = 0; i < constants.length; i++) { if (constants[i] instanceof RecompilableScriptFunctionData) { // replace deserialized function data with the ones we already have diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/runtime/ScriptFunction.java --- a/nashorn/src/jdk/nashorn/internal/runtime/ScriptFunction.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/runtime/ScriptFunction.java Fri Aug 15 17:30:49 2014 +0200 @@ -738,7 +738,7 @@ final Object[] varArgs = (Object[])args[paramCount - 1]; // -1 'cause we're not passing the vararg array itself final int copiedArgCount = args.length - 1; - int varArgCount = varArgs.length; + final int varArgCount = varArgs.length; // Spread arguments for the delegate createApplyOrCallCall invocation. final Object[] spreadArgs = new Object[copiedArgCount + varArgCount]; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/runtime/ScriptFunctionData.java --- a/nashorn/src/jdk/nashorn/internal/runtime/ScriptFunctionData.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/runtime/ScriptFunctionData.java Fri Aug 15 17:30:49 2014 +0200 @@ -37,7 +37,6 @@ import java.lang.invoke.MethodType; import java.util.LinkedList; import java.util.List; - import jdk.nashorn.internal.runtime.linker.LinkerCallSite; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/runtime/Source.java --- a/nashorn/src/jdk/nashorn/internal/runtime/Source.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/runtime/Source.java Fri Aug 15 17:30:49 2014 +0200 @@ -611,7 +611,7 @@ * Set explicit source URL. * @param explicitURL URL set via sourceURL directive */ - public void setExplicitURL(String explicitURL) { + public void setExplicitURL(final String explicitURL) { this.explicitURL = explicitURL; } diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/runtime/SpillProperty.java --- a/nashorn/src/jdk/nashorn/internal/runtime/SpillProperty.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/runtime/SpillProperty.java Fri Aug 15 17:30:49 2014 +0200 @@ -207,7 +207,7 @@ } @Override - void initMethodHandles(Class structure) { + void initMethodHandles(final Class structure) { final int slot = getSlot(); primitiveGetter = primitiveGetter(slot); primitiveSetter = primitiveSetter(slot); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/runtime/WithObject.java --- a/nashorn/src/jdk/nashorn/internal/runtime/WithObject.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/runtime/WithObject.java Fri Aug 15 17:30:49 2014 +0200 @@ -31,7 +31,6 @@ import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; import java.lang.invoke.SwitchPoint; - import jdk.internal.dynalink.CallSiteDescriptor; import jdk.internal.dynalink.linker.GuardedInvocation; import jdk.internal.dynalink.linker.LinkRequest; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java --- a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java Fri Aug 15 17:30:49 2014 +0200 @@ -60,13 +60,13 @@ import java.util.List; import java.util.Map; import java.util.Set; -import jdk.nashorn.api.scripting.ScriptUtils; import jdk.internal.org.objectweb.asm.ClassWriter; import jdk.internal.org.objectweb.asm.Handle; 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.api.scripting.ScriptUtils; import jdk.nashorn.internal.runtime.Context; import jdk.nashorn.internal.runtime.JSType; import jdk.nashorn.internal.runtime.ScriptFunction; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterServices.java --- a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterServices.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterServices.java Fri Aug 15 17:30:49 2014 +0200 @@ -48,7 +48,6 @@ import jdk.internal.org.objectweb.asm.Type; import jdk.internal.org.objectweb.asm.commons.InstructionAdapter; import jdk.nashorn.api.scripting.ScriptUtils; -import jdk.nashorn.api.scripting.ScriptObjectMirror; import jdk.nashorn.internal.runtime.Context; import jdk.nashorn.internal.runtime.ScriptFunction; import jdk.nashorn.internal.runtime.ScriptObject; diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/script/basic/JDK-8038413.js --- a/nashorn/test/script/basic/JDK-8038413.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/script/basic/JDK-8038413.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * 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. @@ -31,7 +31,7 @@ // When adapting a method returning Integer to an optimistic call site // expecting int, can't forego filters because of null. That is, the // Integer->int conversion can't be left to the automatisms present in -// java.lang.invoke.MethodHandle.asType() because of potential null +// java.lang.invoke.MethodHandle.asType() because of potential null // values. var IntegerArray = Java.type("java.lang.Integer[]"); var arr = new IntegerArray(1); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/script/basic/JDK-8043232.js --- a/nashorn/test/script/basic/JDK-8043232.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/script/basic/JDK-8043232.js Fri Aug 15 17:30:49 2014 +0200 @@ -58,8 +58,8 @@ } // constructor of a non-existent class -checkIt(function() new (java.lang["NonExistent(String)"])()); - +checkIt(function() new (java.lang["NonExistent(String)"])()); + // non-existent constructor of an existing class checkIt(function() new (java.lang["Object(String)"])()); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/script/basic/JDK-8044695.js --- a/nashorn/test/script/basic/JDK-8044695.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/script/basic/JDK-8044695.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * This code is free software; you can redistribute 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. diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/script/basic/JDK-8044750.js --- a/nashorn/test/script/basic/JDK-8044750.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/script/basic/JDK-8044750.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * This code is free software; you can redistribute 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. diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/script/basic/JDK-8046026.js --- a/nashorn/test/script/basic/JDK-8046026.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/script/basic/JDK-8046026.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * This code is free software; you can redistribute 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. diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/script/basic/JDK-8046905.js --- a/nashorn/test/script/basic/JDK-8046905.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/script/basic/JDK-8046905.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * This code is free software; you can redistribute 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. @@ -36,7 +36,7 @@ // Running three times so that we test an already linked call site too: // i==0: linking initially with assumed optimistic returned type int. // i==1: linking after deoptimization with returned type Object. -// i==2: re-running code linked in previous iteration. This will +// i==2: re-running code linked in previous iteration. This will // properly exercise the guards too. print("1 level of apply") for(i = 0; i < 3; ++i) { @@ -69,7 +69,7 @@ print(apply.apply(apply,[apply,invocation])) // First change after i==1, so it relinks an otherwise stable linkage if(i == 1) { - invocation = [sort,[[8,7,6,5]]]; + invocation = [sort,[[8,7,6,5]]]; } else if(i == 2) { invocation = [join,[[8,7,6,5],["-"]]]; } diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/script/basic/JDK-8047067.js --- a/nashorn/test/script/basic/JDK-8047067.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/script/basic/JDK-8047067.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * This code is free software; you can redistribute 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. @@ -33,4 +33,4 @@ // program points that'd cause incorrect continuation program point in // the rest-of, and therefore a bad stack, and therefore an AIOOBE in // the continuation setup code. -eval("23", ({})[/x/]) +eval("23", ({})[/x/]) diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/script/basic/JDK-8047166.js --- a/nashorn/test/script/basic/JDK-8047166.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/script/basic/JDK-8047166.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * This code is free software; you can redistribute 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. diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/script/basic/JDK-8047357.js --- a/nashorn/test/script/basic/JDK-8047357.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/script/basic/JDK-8047357.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * This code is free software; you can redistribute 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. diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/script/basic/JDK-8047369.js --- a/nashorn/test/script/basic/JDK-8047369.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/script/basic/JDK-8047369.js Fri Aug 15 17:30:49 2014 +0200 @@ -23,7 +23,7 @@ /** * JDK-8047369: Add regression tests for passing test cases of JDK-8024971 - * + * * @test * @run * @option -scripting @@ -76,14 +76,14 @@ evalExpectValue(< 0 && !contains(onlyTheseTests, test_name)) { - print_if_verbose("Skipping " + test_name); - continue; + print_if_verbose("Skipping " + test_name); + continue; } if (!contains(testsCompiled, test_name)) { - testsCompiled.push(test_name); + testsCompiled.push(test_name); } var str = "Compiling '" + test_name + "'..."; if (files.length > 1) { - str += " (" + files.length + " files)"; + str += " (" + files.length + " files)"; } if (iters != 1) { - str += " (" + iters + " times)"; + str += " (" + iters + " times)"; } str + "..."; print(str); for (var iteration = 0; iteration < iters; iteration++) { - //get a new global to avoid symbol pollution and reloads of base - //in the same namespace - var newGlobal = loadWithNewGlobal({script:'this', name:'test'}); + //get a new global to avoid symbol pollution and reloads of base + //in the same namespace + var newGlobal = loadWithNewGlobal({script:'this', name:'test'}); - //load base into the new global so we get BenchmarkSuite etc - newGlobal.load(base); + //load base into the new global so we get BenchmarkSuite etc + newGlobal.load(base); - //load all files in the single benchmark - for (var k in files) { - var file = files[k]; - if (iteration >= 0) { //only display message on first iteration - var str2 = "\t"; - if (iters > 1) { - str2 += " [iteration " + (iteration + 1) + "]"; - } - str2 += " processing file: " + file + "..."; - print_if_verbose(str2); - } - newGlobal.load("file://" + path + file); - } + //load all files in the single benchmark + for (var k in files) { + var file = files[k]; + if (iteration >= 0) { //only display message on first iteration + var str2 = "\t"; + if (iters > 1) { + str2 += " [iteration " + (iteration + 1) + "]"; + } + str2 += " processing file: " + file + "..."; + print_if_verbose(str2); + } + newGlobal.load("file://" + path + file); + } } print("Done."); } diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/script/nosecurity/JDK-8044798.js --- a/nashorn/test/script/nosecurity/JDK-8044798.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/script/nosecurity/JDK-8044798.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * This code is free software; you can redistribute 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. @@ -91,7 +91,7 @@ for each (var info in infos) { for each (var f in valueDescFields) { print(f.name, "=", f.get(info)); - } + } } // valueInfos - user defined object @@ -99,7 +99,7 @@ for each (var info in infos) { for each (var f in valueDescFields) { print(f.name, "=", f.get(info)); - } + } } // valueAsString diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/script/nosecurity/JDK-8044851.js --- a/nashorn/test/script/nosecurity/JDK-8044851.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/script/nosecurity/JDK-8044851.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * This code is free software; you can redistribute 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. diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/script/nosecurity/JDK-8050964.js --- a/nashorn/test/script/nosecurity/JDK-8050964.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/script/nosecurity/JDK-8050964.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * This code is free software; you can redistribute 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. diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/script/nosecurity/JDK-8055034.js --- a/nashorn/test/script/nosecurity/JDK-8055034.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/script/nosecurity/JDK-8055034.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,28 +1,28 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * This code is free software; you can redistribute 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-8055034: jjs exits interactive mode if exception was thrown when trying to print value of last evaluated expression + * JDK-8055034: jjs exits interactive mode if exception was thrown when trying to print value of last evaluated expression * * @test * @option -scripting diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/script/nosecurity/debuggersupportapi.js --- a/nashorn/test/script/nosecurity/debuggersupportapi.js Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/script/nosecurity/debuggersupportapi.js Fri Aug 15 17:30:49 2014 +0200 @@ -1,21 +1,21 @@ /* * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * This code is free software; you can redistribute 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. diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java --- a/nashorn/test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java Fri Aug 15 17:30:49 2014 +0200 @@ -623,7 +623,7 @@ final ScriptEngine e = m.getEngineByName("nashorn"); e.put(ScriptEngine.FILENAME, "test"); - Object enumerable = e.eval( + final Object enumerable = e.eval( "Object.getOwnPropertyDescriptor(this, " + " 'javax.script.filename').enumerable"); assertEquals(enumerable, Boolean.FALSE); diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/src/jdk/nashorn/api/scripting/ScriptObjectMirrorTest.java --- a/nashorn/test/src/jdk/nashorn/api/scripting/ScriptObjectMirrorTest.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/src/jdk/nashorn/api/scripting/ScriptObjectMirrorTest.java Fri Aug 15 17:30:49 2014 +0200 @@ -31,10 +31,10 @@ import static org.testng.Assert.fail; import java.nio.ByteBuffer; -import java.util.function.Function; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.function.Function; import javax.script.Bindings; import javax.script.Invocable; import javax.script.ScriptContext; @@ -358,7 +358,7 @@ engine.eval("function apply(obj) { " + " return obj instanceof Packages.jdk.nashorn.api.scripting.ScriptObjectMirror; " + "}"); - Function func = invocable.getInterface(Function.class); + final Function func = invocable.getInterface(Function.class); assertFalse((boolean)func.apply(engine.eval("({ x: 2 })"))); } } diff -r 0665ee3822e0 -r b32ccc3a76c9 nashorn/test/src/jdk/nashorn/internal/runtime/ConsStringTest.java --- a/nashorn/test/src/jdk/nashorn/internal/runtime/ConsStringTest.java Thu Aug 14 20:14:54 2014 +0530 +++ b/nashorn/test/src/jdk/nashorn/internal/runtime/ConsStringTest.java Fri Aug 15 17:30:49 2014 +0200 @@ -26,11 +26,7 @@ package jdk.nashorn.internal.runtime; import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertFalse; -import static org.testng.Assert.assertTrue; -import jdk.nashorn.internal.runtime.JSType; -import jdk.nashorn.internal.runtime.ScriptRuntime; import org.testng.annotations.Test; /**