Licenses & rat.xml
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/43581f48 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/43581f48 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/43581f48 Branch: refs/heads/tomee-7.0.0-M1 Commit: 43581f4899f454910fa583b7c8d099d5297aa5e0 Parents: 49fc65c Author: andygumbre...@apache.org <andy...@gmx.de> Authored: Tue Jun 16 09:58:17 2015 +0200 Committer: andygumbre...@apache.org <andy...@gmx.de> Committed: Tue Jun 16 09:58:17 2015 +0200 ---------------------------------------------------------------------- .../org/apache/openejb/util/OutputScanner.java | 207 +++++++++---------- .../openejb/assembler/DeployerEjbTest.java | 16 ++ .../apache/openejb/junit/ScopesRuleTest.java | 16 ++ .../openejb/util/ReversePasswordCipher.java | 16 ++ .../main/java/org/apache/openejb/jee/Scan.java | 24 ++- .../org/apache/openejb/loader/FilesTest.java | 16 ++ .../test/resources/datasets/expected-users.yml | 14 ++ .../src/test/resources/datasets/users.yml | 14 ++ .../openejb/maven/util/XmlFormatterTest.java | 16 ++ rat.xml | 13 ++ 10 files changed, 240 insertions(+), 112 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tomee/blob/43581f48/container/openejb-core/src/main/java/org/apache/openejb/util/OutputScanner.java ---------------------------------------------------------------------- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/util/OutputScanner.java b/container/openejb-core/src/main/java/org/apache/openejb/util/OutputScanner.java index 44ef6ba..caadffe 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/util/OutputScanner.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/util/OutputScanner.java @@ -1,104 +1,103 @@ -/* - * 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 regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.openejb.util; - -import org.codehaus.swizzle.stream.ScanBuffer; - -import java.io.FilterOutputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; - -/** - * @version $Rev$ $Date$ - */ -public class OutputScanner extends FilterOutputStream { - - private final CountDownLatch found = new CountDownLatch(1); - - public OutputScanner(final OutputStream out, final String scanString) { - super(null); - this.out = new Scan(out, scanString); - } - - public class Scan extends FilterOutputStream { - - private final ScanBuffer scan; - - public Scan(final OutputStream out, final String scanString) { - super(out); - scan = new ScanBuffer(scanString); - } - - @Override - public void write(final int b) throws IOException { - check(b); - super.write(b); - } - - @Override - public void write(final byte[] bytes) throws IOException { - for (final byte b : bytes) { - check(b); - } - super.write(bytes); - } - - @Override - public void write(final byte[] bytes, final int off, final int len) throws IOException { - for (int i = off; i < len; i++) { - check(bytes[i]); - } - super.write(bytes, off, len); - } - - private void check(final int b) { - scan.append(b); - if (scan.match()) { - // Cut ourselves out of the call chain. - // - // This works because - // - ScanningOutputStreamFilter.this.out == this - // - this.out != this) - // - // Our parent is delegating to us and we are delegating - // to the actual OutputStream - // - // To cut ourselves out of the call chain and eliminate - // the overhead of checking the ScanBuffer, we set our - // parent to not delegate to us and to instead delegate - // to the actual OutputStream. - - // Intellij mistakenly shows this grayed out, - // however it is very very significant. - OutputScanner.this.out = this.out; - found.countDown(); - } - } - } - - - public void await() throws InterruptedException { - found.await(); - } - - public boolean await(final long timeout, final TimeUnit unit) throws InterruptedException { - return found.await(timeout, unit); - } -} +/* + * 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 regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.openejb.util; + +import org.codehaus.swizzle.stream.ScanBuffer; + +import java.io.FilterOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +/** + * @version $Rev$ $Date$ + */ +public class OutputScanner extends FilterOutputStream { + + private final CountDownLatch found = new CountDownLatch(1); + + public OutputScanner(final OutputStream out, final String scanString) { + super(null); + this.out = new Scan(out, scanString); + } + + public class Scan extends FilterOutputStream { + + private final ScanBuffer scan; + + public Scan(final OutputStream out, final String scanString) { + super(out); + scan = new ScanBuffer(scanString); + } + + @Override + public void write(final int b) throws IOException { + check(b); + super.write(b); + } + + @Override + public void write(final byte[] bytes) throws IOException { + for (final byte b : bytes) { + check(b); + } + super.write(bytes); + } + + @Override + public void write(final byte[] bytes, final int off, final int len) throws IOException { + for (int i = off; i < len; i++) { + check(bytes[i]); + } + super.write(bytes, off, len); + } + + private void check(final int b) { + scan.append(b); + if (scan.match()) { + // Cut ourselves out of the call chain. + // + // This works because + // - ScanningOutputStreamFilter.this.out == this + // - this.out != this) + // + // Our parent is delegating to us and we are delegating + // to the actual OutputStream + // + // To cut ourselves out of the call chain and eliminate + // the overhead of checking the ScanBuffer, we set our + // parent to not delegate to us and to instead delegate + // to the actual OutputStream. + + // Intellij mistakenly shows this grayed out, + // however it is very very significant. + OutputScanner.this.out = this.out; + found.countDown(); + } + } + } + + + public void await() throws InterruptedException { + found.await(); + } + + public boolean await(final long timeout, final TimeUnit unit) throws InterruptedException { + return found.await(timeout, unit); + } +} http://git-wip-us.apache.org/repos/asf/tomee/blob/43581f48/container/openejb-core/src/test/java/org/apache/openejb/assembler/DeployerEjbTest.java ---------------------------------------------------------------------- diff --git a/container/openejb-core/src/test/java/org/apache/openejb/assembler/DeployerEjbTest.java b/container/openejb-core/src/test/java/org/apache/openejb/assembler/DeployerEjbTest.java index 6a073db..b477ed0 100644 --- a/container/openejb-core/src/test/java/org/apache/openejb/assembler/DeployerEjbTest.java +++ b/container/openejb-core/src/test/java/org/apache/openejb/assembler/DeployerEjbTest.java @@ -1,3 +1,19 @@ +/** + * 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 regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.openejb.assembler; import org.apache.openejb.OpenEJB; http://git-wip-us.apache.org/repos/asf/tomee/blob/43581f48/container/openejb-core/src/test/java/org/apache/openejb/junit/ScopesRuleTest.java ---------------------------------------------------------------------- diff --git a/container/openejb-core/src/test/java/org/apache/openejb/junit/ScopesRuleTest.java b/container/openejb-core/src/test/java/org/apache/openejb/junit/ScopesRuleTest.java index 659622a..8669970 100644 --- a/container/openejb-core/src/test/java/org/apache/openejb/junit/ScopesRuleTest.java +++ b/container/openejb-core/src/test/java/org/apache/openejb/junit/ScopesRuleTest.java @@ -1,3 +1,19 @@ +/** + * 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 regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.openejb.junit; import org.apache.openejb.testing.ContainerProperties; http://git-wip-us.apache.org/repos/asf/tomee/blob/43581f48/container/openejb-core/src/test/java/org/apache/openejb/util/ReversePasswordCipher.java ---------------------------------------------------------------------- diff --git a/container/openejb-core/src/test/java/org/apache/openejb/util/ReversePasswordCipher.java b/container/openejb-core/src/test/java/org/apache/openejb/util/ReversePasswordCipher.java index 2eee3dd..6cdccb8 100644 --- a/container/openejb-core/src/test/java/org/apache/openejb/util/ReversePasswordCipher.java +++ b/container/openejb-core/src/test/java/org/apache/openejb/util/ReversePasswordCipher.java @@ -1,3 +1,19 @@ +/** + * 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 regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.openejb.util; import org.apache.openejb.cipher.PasswordCipher; http://git-wip-us.apache.org/repos/asf/tomee/blob/43581f48/container/openejb-jee/src/main/java/org/apache/openejb/jee/Scan.java ---------------------------------------------------------------------- diff --git a/container/openejb-jee/src/main/java/org/apache/openejb/jee/Scan.java b/container/openejb-jee/src/main/java/org/apache/openejb/jee/Scan.java index 626cf69..8b6d4fa 100644 --- a/container/openejb-jee/src/main/java/org/apache/openejb/jee/Scan.java +++ b/container/openejb-jee/src/main/java/org/apache/openejb/jee/Scan.java @@ -1,11 +1,19 @@ -// -// Ce fichier a été généré par l'implémentation de référence JavaTM Architecture for XML Binding (JAXB), v2.2.7 -// Voir <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> -// Toute modification apportée à ce fichier sera perdue lors de la recompilation du schéma source. -// Généré le : 2014.08.10 à 01:54:19 PM CEST -// - - +/** + * 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 regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.openejb.jee; import java.util.ArrayList; http://git-wip-us.apache.org/repos/asf/tomee/blob/43581f48/container/openejb-loader/src/test/java/org/apache/openejb/loader/FilesTest.java ---------------------------------------------------------------------- diff --git a/container/openejb-loader/src/test/java/org/apache/openejb/loader/FilesTest.java b/container/openejb-loader/src/test/java/org/apache/openejb/loader/FilesTest.java index 9467b9b..7430a5b 100644 --- a/container/openejb-loader/src/test/java/org/apache/openejb/loader/FilesTest.java +++ b/container/openejb-loader/src/test/java/org/apache/openejb/loader/FilesTest.java @@ -1,3 +1,19 @@ +/** + * 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 regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.openejb.loader; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/tomee/blob/43581f48/examples/arquillian-jpa/src/test/resources/datasets/expected-users.yml ---------------------------------------------------------------------- diff --git a/examples/arquillian-jpa/src/test/resources/datasets/expected-users.yml b/examples/arquillian-jpa/src/test/resources/datasets/expected-users.yml index 6670f52..695cf8d 100644 --- a/examples/arquillian-jpa/src/test/resources/datasets/expected-users.yml +++ b/examples/arquillian-jpa/src/test/resources/datasets/expected-users.yml @@ -1,3 +1,17 @@ +# 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 regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. user: - id: 1 name: TomEE http://git-wip-us.apache.org/repos/asf/tomee/blob/43581f48/examples/arquillian-jpa/src/test/resources/datasets/users.yml ---------------------------------------------------------------------- diff --git a/examples/arquillian-jpa/src/test/resources/datasets/users.yml b/examples/arquillian-jpa/src/test/resources/datasets/users.yml index 627933a..d6abd58 100644 --- a/examples/arquillian-jpa/src/test/resources/datasets/users.yml +++ b/examples/arquillian-jpa/src/test/resources/datasets/users.yml @@ -1,3 +1,17 @@ +# 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 regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. user: - id: 1 name: TomEE http://git-wip-us.apache.org/repos/asf/tomee/blob/43581f48/maven/maven-util/src/test/java/org/apache/openejb/maven/util/XmlFormatterTest.java ---------------------------------------------------------------------- diff --git a/maven/maven-util/src/test/java/org/apache/openejb/maven/util/XmlFormatterTest.java b/maven/maven-util/src/test/java/org/apache/openejb/maven/util/XmlFormatterTest.java index a966711..1b372ca 100644 --- a/maven/maven-util/src/test/java/org/apache/openejb/maven/util/XmlFormatterTest.java +++ b/maven/maven-util/src/test/java/org/apache/openejb/maven/util/XmlFormatterTest.java @@ -1,3 +1,19 @@ +/** + * 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 regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.openejb.maven.util; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/tomee/blob/43581f48/rat.xml ---------------------------------------------------------------------- diff --git a/rat.xml b/rat.xml index 3652ca3..e273f2a 100644 --- a/rat.xml +++ b/rat.xml @@ -31,6 +31,7 @@ <patternset id="exclusions"> <exclude name="**/.settings/**"/> <exclude name="**/.idea/**"/> + <exclude name="**/overlays/*.info"/> <exclude name="**/*.json"/> <exclude name="**/target/**"/> <exclude name="**/*.iml"/> @@ -70,11 +71,17 @@ <exclude name="arquillian/arquillian-tomee-tests/src/test/resources/org/apache/openejb/arquillian/tests/jaxrs/foo"/> <exclude name="arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/resources/test.getresources"/> <exclude name="arquillian/arquillian-tomee-webapp-remote/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension"/> + <exclude name="arquillian/arquillian-openejb-embedded/src/main/resources/META-INF/services/cucumber.runtime.io.ResourceIteratorFactory" /> + <exclude name="arquillian/arquillian-openejb-embedded/src/main/resources/META-INF/services/org.apache.openejb.server.httpd.EmbeddedServletContext$ResourceProvider" /> + <exclude name="arquillian/arquillian-openejb-embedded/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension" /> <exclude name="arquillian/arquillian-openejb-embedded-4/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension" /> <exclude name="arquillian/arquillian-openejb-embedded-4/src/main/resources/META-INF/services/cucumber.runtime.io.ResourceIteratorFactory" /> <exclude name="container/openejb-jee/src/main/xsdlist/xsdlist.txt"/> <exclude name="container/openejb-core/src/main/resources/default.exclusions"/> + <exclude name="container/openejb-core/src/main/resources/META-INF/org.apache.openejb.cipher.PasswordCipher/cdi"/> <exclude name="container/openejb-core/src/main/resources/META-INF/services/javax.ejb.spi.EJBContainerProvider"/> + <exclude name="container/openejb-core/src/test/resources/META-INF/multiple"/> + <exclude name="container/openejb-core/src/test/resources/META-INF/org.apache.openejb.cipher.PasswordCipher/reverse"/> <exclude name="container/openejb-core/src/test/resources/META-INF/services/javax.validation.spi.ValidationProvider"/> <exclude name="container/openejb-core/src/test/resources/META-INF/services/org.apache.openejb.core.security.jaas.LoginProvider" /> <exclude name="container/openejb-junit/src/main/resources/META-INF/openejb-test-login.config"/> @@ -92,6 +99,12 @@ <exclude name="examples/server-events/src/main/resources/META-INF/org.apache.openejb.extension" /> <exclude name="examples/testing-security-3/src/main/resources/META-INF/services/org.apache.openejb.core.security.jaas.LoginProvider" /> <exclude name="utils/openejb-mockito/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension"/> + <exclude name="tck/cdi-embedded/src/test/resources/META-INF/org.apache.openejb.extension"/> + <exclude name="tck/cdi-embedded/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension"/> + <exclude name="tomee/tomee-catalina/src/main/resources/META-INF/services/javax.websocket.server.ServerEndpointConfig$Configurator"/> + <exclude name="tomee/tomee-embedded/src/test/resources/META-INF/services/javax.servlet.ServletContainerInitializer"/> + <exclude name="tomee/tomee-juli/src/main/resources/META-INF/services/org.apache.juli.logging.Log"/> + <exclude name="tomee/tomee-myfaces/src/main/resources/META-INF/services/org.apache.myfaces.spi.WebConfigProvider"/> <exclude name="tomee/apache-tomee/src/main/resources/service.readme.txt"/> <exclude name="tomee/apache-tomee-deb/src/main/resources/prerm"/> <exclude name="tomee/apache-tomee-deb/src/main/resources/postinst"/>