Skip to content

Commit

Permalink
further clarification for license/NOTICE files (not yet complete)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulk-asert committed Jul 16, 2015
1 parent 2e5288c commit 0699555
Show file tree
Hide file tree
Showing 10 changed files with 247 additions and 37 deletions.
63 changes: 42 additions & 21 deletions licenses/binzip/jsr223.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,44 @@
JSR223 License

Copyright 2006 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.

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 the Sun Microsystems nor the names of
is 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 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
The following files in the optional groovy-jsr223 component:

src/main/org/codehaus/groovy/jsr223/GroovyCompiledScript.java
src/main/org/codehaus/groovy/jsr223/GroovyScriptEngineFactory.java
src/main/org/codehaus/groovy/jsr223/GroovyScriptEngineImpl.java

were derived from reference implementation files developed by Sun in
collaboration with the Groovy community. The reference implementation
files had the following license:

Copyright (c) 2006, Sun Microsystems, Inc.
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 the Sun Microsystems, Inc. nor the names of
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 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
28 changes: 28 additions & 0 deletions licenses/binzip/xstream.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Copyright (c) 2003-2006, Joe Walnes
Copyright (c) 2006-2009, 2011 XStream Committers
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of
conditions and the following disclaimer.

2. 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.

3. Neither the name of XStream 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 PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
5 changes: 5 additions & 0 deletions notices/NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Apache Groovy
Copyright 2003-2015 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http:https://www.apache.org/).
33 changes: 33 additions & 0 deletions notices/NOTICE-BINZIP
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Apache Groovy
Copyright 2003-2015 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http:https://www.apache.org/).

This product includes/uses ANTLR (www.antlr2.org)
Developed by Terence Parr 1989-2006

This product includes/uses ASM (asm.ow2.org)
Copyright (c) 2000-2011 INRIA, France Telecom. All rights reserved.

This product includes/uses XStream (https://x-stream.github.io/)
Made available under a BSD license. Copyright (c) 2003-2006, Joe Walnes
Copyright (c) 2006-2009, 2011 XStream Committers. All rights reserved.

This product includes/uses JUnit (junit.org)
Under the terms of the Eclipse Public License - v1.0

This product includes/uses Hamcrest (www.hamcrest.org)
Made available under a BSD License.
Copyright (c) 2000-2015. All rights reserved.

This product includes/uses Jline (http:https://jline.sourceforge.net/)
Distributed under the BSD license
Copyright (c) 2002-2006, Marc Prud'hommeaux <[email protected]>

This product includes/uses QDox (https://github.com/paul-hammant/qdox)
Copyright 2002-2009 Joe Walnes and QDox Project Team

This product includes/uses source files adapted from the JSR-223 reference
implementation which has the following notice
Copyright 2006 Sun Microsystems, Inc. All rights reserved.
13 changes: 13 additions & 0 deletions notices/NOTICE-JARJAR
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Apache Groovy
Copyright 2003-2015 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http:https://www.apache.org/).

This product includes/uses ANTLR (http:https://www.antlr2.org/)
Developed by Terence Parr 1989-2006

This product includes/uses ASM (http:https://asm.ow2.org/)
Copyright (c) 2000-2011 INRIA, France Telecom
All rights reserved.

16 changes: 16 additions & 0 deletions notices/NOTICE-JARJARALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Apache Groovy
Copyright 2003-2015 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http:https://www.apache.org/).

This product includes/uses ANTLR (http:https://www.antlr2.org/)
Developed by Terence Parr 1989-2006

This product includes/uses ASM (http:https://asm.ow2.org/)
Copyright (c) 2000-2011 INRIA, France Telecom
All rights reserved.

This product includes/uses source files adapted from the JSR-223 reference
implementation which has the following notice
Copyright 2006 Sun Microsystems, Inc. All rights reserved.
9 changes: 9 additions & 0 deletions notices/NOTICE-JSR223
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Apache Groovy
Copyright 2003-2015 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http:https://www.apache.org/).

This product includes/uses source files adapted from the JSR-223 reference
implementation which has the following notice
Copyright 2006 Sun Microsystems, Inc. All rights reserved.
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
/*
* The initial contribution was derived from the reference implementation
* developed by Sun in consultation with the Groovy community. The reference
* implementation had the following license header:
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* 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 the Sun Microsystems nor the names of
* is 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 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Subsequent modifications by the Groovy community have been done under the Apache License v2:
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
Expand Down Expand Up @@ -27,25 +55,25 @@
* Used to represent compiled Groovy scripts. Such scripts may be executed repeatedly
* by Groovy's <code>ScriptEngine</code> using the <code>eval</code> method without reparsing overheads.
*
* @author Mike Grogan
* @author A. Sundararajan
* @author Adapted from original by Mike Grogan
* @author Adapted from original by A. Sundararajan
*/
public class GroovyCompiledScript extends CompiledScript {

private final GroovyScriptEngineImpl engine;
private final Class clasz;

public GroovyCompiledScript(GroovyScriptEngineImpl engine, Class clazz) {
this.engine = engine;
this.clasz = clazz;
}

public Object eval(ScriptContext context) throws ScriptException {
return engine.eval(clasz, context);
}
}

public ScriptEngine getEngine() {
return engine;
}

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
/*
* The initial contribution was derived from the reference implementation
* developed by Sun in consultation with the Groovy community. The reference
* implementation had the following license header:
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* 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 the Sun Microsystems nor the names of
* is 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 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Subsequent modifications by the Groovy community have been done under the Apache License v2:
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
/*
* The initial contribution was derived from the reference implementation
* developed by Sun in consultation with the Groovy community. The reference
* implementation had the following license header:
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* 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 the Sun Microsystems nor the names of
* is 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 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Subsequent modifications by the Groovy community have been done under the Apache License v2:
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
Expand Down Expand Up @@ -58,15 +86,16 @@
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

/*
* @author Mike Grogan
* @author A. Sundararajan
/**
* JSR-223 Engine implementation.
*
* @author Adapted from original by Mike Grogan
* @author Adapted from original by A. Sundararajan
* @author Jim White
* @author Guillaume Laforge
* @author Jochen Theodorou
*/
public class GroovyScriptEngineImpl
extends AbstractScriptEngine implements Compilable, Invocable {
public class GroovyScriptEngineImpl extends AbstractScriptEngine implements Compilable, Invocable {

private static boolean debug = false;

Expand Down Expand Up @@ -106,7 +135,7 @@ public Object eval(String script, ScriptContext ctx)
try {
String val = (String) ctx.getAttribute("#jsr223.groovy.engine.keep.globals", ScriptContext.ENGINE_SCOPE);
ReferenceBundle bundle = ReferenceBundle.getHardBundle();
if (val!=null && val.length()>0) {
if (val != null && val.length() > 0) {
if (val.equalsIgnoreCase("soft")) {
bundle = ReferenceBundle.getSoftBundle();
} else if (val.equalsIgnoreCase("weak")) {
Expand Down Expand Up @@ -203,8 +232,8 @@ Object eval(Class scriptClass, final ScriptContext ctx) throws ScriptException {
// enable autoFlush because otherwise it might not get done!
final Writer writer = ctx.getWriter();
ctx.setAttribute("out", (writer instanceof PrintWriter) ?
writer :
new PrintWriter(writer, true),
writer :
new PrintWriter(writer, true),
ScriptContext.ENGINE_SCOPE);

// Not going to do this after all (at least for now).
Expand Down

0 comments on commit 0699555

Please sign in to comment.