[Git][java-team/libsejda-injector-java][upstream] New upstream version 2.0.0
Markus Koschany
gitlab at salsa.debian.org
Fri Sep 25 14:45:16 BST 2020
Markus Koschany pushed to branch upstream at Debian Java Maintainers / libsejda-injector-java
Commits:
5c50c002 by Markus Koschany at 2020-09-25T15:38:48+02:00
New upstream version 2.0.0
- - - - -
26 changed files:
- .travis.yml
- README.md
- development/eclipse/codetemplates.xml
- pom.xml
- src/main/java/org/sejda/injector/Auto.java → src/main/java/org/pdfsam/injector/Auto.java
- src/main/java/org/sejda/injector/Components.java → src/main/java/org/pdfsam/injector/Components.java
- src/main/java/org/sejda/injector/InjectionException.java → src/main/java/org/pdfsam/injector/InjectionException.java
- src/main/java/org/sejda/injector/Injector.java → src/main/java/org/pdfsam/injector/Injector.java
- src/main/java/org/sejda/injector/Key.java → src/main/java/org/pdfsam/injector/Key.java
- src/main/java/org/sejda/injector/Prototype.java → src/main/java/org/pdfsam/injector/Prototype.java
- src/main/java/org/sejda/injector/Provides.java → src/main/java/org/pdfsam/injector/Provides.java
- + src/test/java/org/pdfsam/injector/AmbiguousModuleTest.java
- src/test/java/org/sejda/injector/AutoProviderTest.java → src/test/java/org/pdfsam/injector/AutoProviderTest.java
- src/test/java/org/sejda/injector/CircularDependencyTest.java → src/test/java/org/pdfsam/injector/CircularDependencyTest.java
- src/test/java/org/sejda/injector/DependencyTest.java → src/test/java/org/pdfsam/injector/DependencyTest.java
- src/test/java/org/sejda/injector/InjectorTest.java → src/test/java/org/pdfsam/injector/InjectorTest.java
- src/test/java/org/sejda/injector/ListInjectionTest.java → src/test/java/org/pdfsam/injector/ListInjectionTest.java
- src/test/java/org/sejda/injector/ModuleOverrideTest.java → src/test/java/org/pdfsam/injector/ModuleOverrideTest.java
- src/test/java/org/sejda/injector/NamedDependencyTest.java → src/test/java/org/pdfsam/injector/NamedDependencyTest.java
- src/test/java/org/sejda/injector/PojoProvidedThroughModuleTest.java → src/test/java/org/pdfsam/injector/PojoProvidedThroughModuleTest.java
- src/test/java/org/sejda/injector/PolymorphicDependencyTest.java → src/test/java/org/pdfsam/injector/PolymorphicDependencyTest.java
- src/test/java/org/sejda/injector/ProviderInjectionTest.java → src/test/java/org/pdfsam/injector/ProviderInjectionTest.java
- src/test/java/org/sejda/injector/QualifiedDependencyTest.java → src/test/java/org/pdfsam/injector/QualifiedDependencyTest.java
- src/test/java/org/sejda/injector/SingletonTest.java → src/test/java/org/pdfsam/injector/SingletonTest.java
- src/test/java/org/sejda/injector/TransitiveDependencyTest.java → src/test/java/org/pdfsam/injector/TransitiveDependencyTest.java
- − src/test/java/org/sejda/injector/AmbiguousModuleTest.java
Changes:
=====================================
.travis.yml
=====================================
@@ -1,4 +1,5 @@
language: java
sudo: false
+dist: xenial
jdk:
- - oraclejdk8
+ - openjdk8
=====================================
README.md
=====================================
@@ -1,7 +1,7 @@
-Sejda-injector (http://www.sejda.org)
+pdfsam-injector (https://pdfsam.org)
=====
[![Build Status](https://travis-ci.org/torakiki/pdfsam-injector.png)](https://travis-ci.org/torakiki/pdfsam-injector)
[![License](http://img.shields.io/badge/license-APLv2-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
-A simple dependency injection engine based on [Feather](https://github.com/zsoltherpai/feather) and used in [PDFsam](http://pdfsam.org).
+A simple dependency injection engine based on [Feather](https://github.com/zsoltherpai/feather) and used in [PDFsam](https://pdfsam.org).
=====================================
development/eclipse/codetemplates.xml
=====================================
@@ -1,13 +1,8 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="gettercomment_context" deleted="false" description="Comment for getter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name="gettercomment">/**
- * @return the ${bare_field_name}
- */</template><template autoinsert="true" context="settercomment_context" deleted="false" description="Comment for setter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.settercomment" name="settercomment">/**
- * @param ${param} the ${bare_field_name} to set
- */</template><template autoinsert="true" context="constructorcomment_context" deleted="false" description="Comment for created constructors" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name="constructorcomment">/**
- * ${tags}
- */</template><template autoinsert="false" context="filecomment_context" deleted="false" description="Comment for created Java files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.filecomment" name="filecomment">/*
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="false" context="filecomment_context" deleted="false" description="Comment for created Java files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.filecomment" name="filecomment">/*
+ * This file is part of the PDF Split And Merge source code
* Created on ${date}
- * Copyright 2010 by Andrea Vacondio (andrea.vacondio at gmail.com).
- *
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
* Licensed 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
@@ -19,28 +14,7 @@
* 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.
- */</template><template autoinsert="false" context="typecomment_context" deleted="false" description="Comment for created types" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.typecomment" name="typecomment">/**
- * @author Andrea Vacondio
*
- * ${tags}
- */</template><template autoinsert="true" context="fieldcomment_context" deleted="false" description="Comment for fields" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name="fieldcomment">/**
- *
- */</template><template autoinsert="true" context="methodcomment_context" deleted="false" description="Comment for non-overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name="methodcomment">/**
- * ${tags}
- */</template><template autoinsert="true" context="overridecomment_context" deleted="false" description="Comment for overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name="overridecomment">/* (non-Javadoc)
- * ${see_to_overridden}
- */</template><template autoinsert="true" context="delegatecomment_context" deleted="false" description="Comment for delegate methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name="delegatecomment">/**
- * ${tags}
- * ${see_to_target}
- */</template><template autoinsert="true" context="newtype_context" deleted="false" description="Newly created files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.newtype" name="newtype">${filecomment}
-${package_declaration}
-
-${typecomment}
-${type_declaration}</template><template autoinsert="true" context="classbody_context" deleted="false" description="Code in new class type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.classbody" name="classbody">
-</template><template autoinsert="true" context="interfacebody_context" deleted="false" description="Code in new interface type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name="interfacebody">
-</template><template autoinsert="true" context="enumbody_context" deleted="false" description="Code in new enum type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.enumbody" name="enumbody">
-</template><template autoinsert="true" context="annotationbody_context" deleted="false" description="Code in new annotation type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name="annotationbody">
-</template><template autoinsert="true" context="catchblock_context" deleted="false" description="Code in new catch blocks" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.catchblock" name="catchblock">// ${todo} Auto-generated catch block
-${exception_var}.printStackTrace();</template><template autoinsert="true" context="methodbody_context" deleted="false" description="Code in created method stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodbody" name="methodbody">// ${todo} Auto-generated method stub
-${body_statement}</template><template autoinsert="true" context="constructorbody_context" deleted="false" description="Code in created constructor stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name="constructorbody">${body_statement}
-// ${todo} Auto-generated constructor stub</template><template autoinsert="true" context="getterbody_context" deleted="false" description="Code in created getters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.getterbody" name="getterbody">return ${field};</template><template autoinsert="true" context="setterbody_context" deleted="false" description="Code in created setters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.setterbody" name="setterbody">${field} = ${param};</template></templates>
\ No newline at end of file
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */</template></templates>
\ No newline at end of file
=====================================
pom.xml
=====================================
@@ -1,23 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.sejda</groupId>
- <artifactId>sejda-injector</artifactId>
+ <groupId>org.pdfsam</groupId>
+ <artifactId>pdfsam-injector</artifactId>
<packaging>jar</packaging>
- <name>sejda-injector</name>
- <version>1.0.2</version>
+ <name>pdfsam-injector</name>
+ <version>2.0.0</version>
<description>A simple dependency injection engine based on Feather</description>
- <url>http://www.sejda.org</url>
+ <url>https://pdfsam.org</url>
<issueManagement>
<system>GitHub</system>
- <url>https://github.com/torakiki/sejda-injector/</url>
+ <url>https://github.com/torakiki/pdfsam-injector/</url>
</issueManagement>
<organization>
- <name>sejda</name>
- <url>http://www.sejda.org</url>
+ <name>Sober Lemur S.a.s. di Vacondio Andrea</name>
+ <url>https://pdfsam.org</url>
</organization>
<licenses>
@@ -34,10 +34,10 @@
</properties>
<scm>
- <connection>scm:git:git at github.com:torakiki/sejda-injector.git</connection>
- <developerConnection>scm:git:git at github.com:torakiki/sejda-injector.git</developerConnection>
- <url>scm:git:git at github.com:torakiki/sejda-injector.git</url>
- <tag>v1.0.2</tag>
+ <connection>scm:git:git at github.com:torakiki/pdfsam-injector.git</connection>
+ <developerConnection>scm:git:git at github.com:torakiki/pdfsam-injector.git</developerConnection>
+ <url>scm:git:git at github.com:torakiki/pdfsam-injector.git</url>
+ <tag>v2.0.0</tag>
</scm>
<developers>
@@ -54,8 +54,8 @@
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
- <id>bintray</id>
- <url>https://api.bintray.com/maven/sejdapdf/maven/sejda</url>
+ <id>ossrh</id>
+ <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
@@ -67,7 +67,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>2.10.3</version>
+ <version>3.0.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
@@ -80,7 +80,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
- <version>2.5.2</version>
+ <version>3.0.0-M1</version>
<configuration>
<tagNameFormat>v@{project.version}</tagNameFormat>
<localCheckout>true</localCheckout>
@@ -101,6 +101,17 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>nexus-staging-maven-plugin</artifactId>
+ <version>1.6.8</version>
+ <extensions>true</extensions>
+ <configuration>
+ <serverId>ossrh</serverId>
+ <nexusUrl>https://oss.sonatype.org/</nexusUrl>
+ <autoReleaseAfterClose>true</autoReleaseAfterClose>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
@@ -111,23 +122,21 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.3</version>
+ <version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
- <debug>true</debug>
- <debuglevel>lines,vars,source</debuglevel>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.6</version>
+ <version>3.1.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
- <version>2.4</version>
+ <version>3.1.0</version>
<executions>
<execution>
<id>attach-sources</id>
@@ -137,24 +146,29 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>3.0.0-M4</version>
+ </plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <version>1.7.21</version>
+ <version>1.7.29</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
- <version>1.1.7</version>
+ <version>1.2.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>1.10.19</version>
+ <version>3.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
=====================================
src/main/java/org/sejda/injector/Auto.java → src/main/java/org/pdfsam/injector/Auto.java
=====================================
@@ -1,4 +1,7 @@
/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
* Licensed 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
@@ -11,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.sejda.injector;
+package org.pdfsam.injector;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
=====================================
src/main/java/org/sejda/injector/Components.java → src/main/java/org/pdfsam/injector/Components.java
=====================================
@@ -1,4 +1,7 @@
/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
* Licensed 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
@@ -11,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.sejda.injector;
+package org.pdfsam.injector;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
=====================================
src/main/java/org/sejda/injector/InjectionException.java → src/main/java/org/pdfsam/injector/InjectionException.java
=====================================
@@ -1,4 +1,7 @@
/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
* Licensed 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
@@ -11,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.sejda.injector;
+package org.pdfsam.injector;
public class InjectionException extends RuntimeException {
InjectionException(String message) {
=====================================
src/main/java/org/sejda/injector/Injector.java → src/main/java/org/pdfsam/injector/Injector.java
=====================================
@@ -1,4 +1,7 @@
/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
* Licensed 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
@@ -11,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.sejda.injector;
+package org.pdfsam.injector;
import static java.util.Collections.singleton;
import static java.util.Objects.isNull;
@@ -303,9 +306,8 @@ public class Injector implements Closeable {
Set<Key<?>> appended = new LinkedHashSet<>(set);
appended.add(newKey);
return appended;
- } else {
- return singleton(newKey);
}
+ return singleton(newKey);
}
private static String chain(Set<Key<?>> chain, Key<?> lastKey) {
@@ -330,10 +332,10 @@ public class Injector implements Closeable {
if (constructor != null) {
constructor.setAccessible(true);
return constructor;
- } else {
- throw new InjectionException(String.format(
- "%s doesn't have an @Inject or no-arg constructor, or a configured provider", key.type.getName()));
}
+ throw new InjectionException(String.format(
+ "%s doesn't have an @Inject or no-arg constructor, or a configured provider", key.type.getName()));
+
}
private static Set<Method> providers(Class<?> type) {
=====================================
src/main/java/org/sejda/injector/Key.java → src/main/java/org/pdfsam/injector/Key.java
=====================================
@@ -1,4 +1,7 @@
/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
* Licensed 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
@@ -11,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.sejda.injector;
+package org.pdfsam.injector;
import java.lang.annotation.Annotation;
@@ -52,10 +55,10 @@ public class Key<T> {
static <T> Key<T> of(Class<T> type, Annotation qualifier) {
if (qualifier == null) {
return Key.of(type);
- } else {
- return qualifier.annotationType().equals(Named.class) ? Key.of(type, ((Named) qualifier).value())
- : Key.of(type, qualifier.annotationType());
}
+ return qualifier.annotationType().equals(Named.class) ? Key.of(type, ((Named) qualifier).value())
+ : Key.of(type, qualifier.annotationType());
+
}
@Override
=====================================
src/main/java/org/sejda/injector/Prototype.java → src/main/java/org/pdfsam/injector/Prototype.java
=====================================
@@ -1,4 +1,7 @@
/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
* Licensed 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
@@ -11,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.sejda.injector;
+package org.pdfsam.injector;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
=====================================
src/main/java/org/sejda/injector/Provides.java → src/main/java/org/pdfsam/injector/Provides.java
=====================================
@@ -1,4 +1,7 @@
/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
* Licensed 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
@@ -11,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.sejda.injector;
+package org.pdfsam.injector;
import java.lang.annotation.*;
=====================================
src/test/java/org/pdfsam/injector/AmbiguousModuleTest.java
=====================================
@@ -0,0 +1,41 @@
+/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
+ * Licensed 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.pdfsam.injector;
+
+import org.junit.Test;
+import org.pdfsam.injector.InjectionException;
+import org.pdfsam.injector.Injector;
+import org.pdfsam.injector.Provides;
+
+public class AmbiguousModuleTest {
+ @Test(expected = InjectionException.class)
+ public void ambiguousModule() {
+ Injector.start(new Module());
+ }
+
+ public static class Module {
+ @Provides
+ String foo() {
+ return "foo";
+ }
+
+ @Provides
+ String bar() {
+ return "bar";
+ }
+ }
+}
=====================================
src/test/java/org/sejda/injector/AutoProviderTest.java → src/test/java/org/pdfsam/injector/AutoProviderTest.java
=====================================
@@ -1,4 +1,20 @@
-package org.sejda.injector;
+/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
+ * Licensed 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.pdfsam.injector;
import static org.mockito.Mockito.verify;
@@ -7,10 +23,10 @@ import java.util.function.Consumer;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
-import org.sejda.injector.Auto;
-import org.sejda.injector.Components;
-import org.sejda.injector.Injector;
-import org.sejda.injector.Provides;
+import org.pdfsam.injector.Auto;
+import org.pdfsam.injector.Components;
+import org.pdfsam.injector.Injector;
+import org.pdfsam.injector.Provides;
public class AutoProviderTest {
private static Consumer<String> HIT;
=====================================
src/test/java/org/sejda/injector/CircularDependencyTest.java → src/test/java/org/pdfsam/injector/CircularDependencyTest.java
=====================================
@@ -1,4 +1,20 @@
-package org.sejda.injector;
+/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
+ * Licensed 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.pdfsam.injector;
import static org.junit.Assert.assertNotNull;
@@ -6,8 +22,8 @@ import javax.inject.Inject;
import javax.inject.Provider;
import org.junit.Test;
-import org.sejda.injector.InjectionException;
-import org.sejda.injector.Injector;
+import org.pdfsam.injector.InjectionException;
+import org.pdfsam.injector.Injector;
public class CircularDependencyTest {
@Test(expected = InjectionException.class)
=====================================
src/test/java/org/sejda/injector/DependencyTest.java → src/test/java/org/pdfsam/injector/DependencyTest.java
=====================================
@@ -1,12 +1,28 @@
-package org.sejda.injector;
+/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
+ * Licensed 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.pdfsam.injector;
import static org.junit.Assert.assertNotNull;
import javax.inject.Provider;
import org.junit.Test;
-import org.sejda.injector.InjectionException;
-import org.sejda.injector.Injector;
+import org.pdfsam.injector.InjectionException;
+import org.pdfsam.injector.Injector;
public class DependencyTest {
@Test
=====================================
src/test/java/org/sejda/injector/InjectorTest.java → src/test/java/org/pdfsam/injector/InjectorTest.java
=====================================
@@ -1,11 +1,27 @@
-package org.sejda.injector;
+/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
+ * Licensed 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.pdfsam.injector;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.sejda.injector.InjectionException;
-import org.sejda.injector.Injector;
-import org.sejda.injector.Provides;
+import org.pdfsam.injector.InjectionException;
+import org.pdfsam.injector.Injector;
+import org.pdfsam.injector.Provides;
public class InjectorTest {
@Test(expected = InjectionException.class)
=====================================
src/test/java/org/sejda/injector/ListInjectionTest.java → src/test/java/org/pdfsam/injector/ListInjectionTest.java
=====================================
@@ -1,4 +1,20 @@
-package org.sejda.injector;
+/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
+ * Licensed 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.pdfsam.injector;
import static org.junit.Assert.assertEquals;
@@ -9,10 +25,10 @@ import javax.inject.Inject;
import javax.inject.Named;
import org.junit.Test;
-import org.sejda.injector.InjectionException;
-import org.sejda.injector.Injector;
-import org.sejda.injector.Key;
-import org.sejda.injector.Provides;
+import org.pdfsam.injector.InjectionException;
+import org.pdfsam.injector.Injector;
+import org.pdfsam.injector.Key;
+import org.pdfsam.injector.Provides;
public class ListInjectionTest {
@Test
=====================================
src/test/java/org/sejda/injector/ModuleOverrideTest.java → src/test/java/org/pdfsam/injector/ModuleOverrideTest.java
=====================================
@@ -1,10 +1,26 @@
-package org.sejda.injector;
+/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
+ * Licensed 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.pdfsam.injector;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import org.sejda.injector.Injector;
-import org.sejda.injector.Provides;
+import org.pdfsam.injector.Injector;
+import org.pdfsam.injector.Provides;
public class ModuleOverrideTest {
@Test
=====================================
src/test/java/org/sejda/injector/NamedDependencyTest.java → src/test/java/org/pdfsam/injector/NamedDependencyTest.java
=====================================
@@ -1,4 +1,20 @@
-package org.sejda.injector;
+/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
+ * Licensed 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.pdfsam.injector;
import static org.junit.Assert.assertEquals;
@@ -6,10 +22,10 @@ import javax.inject.Inject;
import javax.inject.Named;
import org.junit.Test;
-import org.sejda.injector.InjectionException;
-import org.sejda.injector.Injector;
-import org.sejda.injector.Key;
-import org.sejda.injector.Provides;
+import org.pdfsam.injector.InjectionException;
+import org.pdfsam.injector.Injector;
+import org.pdfsam.injector.Key;
+import org.pdfsam.injector.Provides;
public class NamedDependencyTest {
@Test
=====================================
src/test/java/org/sejda/injector/PojoProvidedThroughModuleTest.java → src/test/java/org/pdfsam/injector/PojoProvidedThroughModuleTest.java
=====================================
@@ -1,12 +1,28 @@
-package org.sejda.injector;
+/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
+ * Licensed 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.pdfsam.injector;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;
-import org.sejda.injector.InjectionException;
-import org.sejda.injector.Injector;
-import org.sejda.injector.Provides;
+import org.pdfsam.injector.InjectionException;
+import org.pdfsam.injector.Injector;
+import org.pdfsam.injector.Provides;
public class PojoProvidedThroughModuleTest {
@Test(expected = InjectionException.class)
=====================================
src/test/java/org/sejda/injector/PolymorphicDependencyTest.java → src/test/java/org/pdfsam/injector/PolymorphicDependencyTest.java
=====================================
@@ -1,4 +1,20 @@
-package org.sejda.injector;
+/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
+ * Licensed 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.pdfsam.injector;
import static org.junit.Assert.assertEquals;
@@ -6,9 +22,9 @@ import javax.inject.Inject;
import javax.inject.Named;
import org.junit.Test;
-import org.sejda.injector.Injector;
-import org.sejda.injector.Key;
-import org.sejda.injector.Provides;
+import org.pdfsam.injector.Injector;
+import org.pdfsam.injector.Key;
+import org.pdfsam.injector.Provides;
public class PolymorphicDependencyTest {
@Test
=====================================
src/test/java/org/sejda/injector/ProviderInjectionTest.java → src/test/java/org/pdfsam/injector/ProviderInjectionTest.java
=====================================
@@ -1,4 +1,20 @@
-package org.sejda.injector;
+/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
+ * Licensed 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.pdfsam.injector;
import static org.junit.Assert.assertNotNull;
@@ -6,7 +22,7 @@ import javax.inject.Inject;
import javax.inject.Provider;
import org.junit.Test;
-import org.sejda.injector.Injector;
+import org.pdfsam.injector.Injector;
public class ProviderInjectionTest {
@Test
=====================================
src/test/java/org/sejda/injector/QualifiedDependencyTest.java → src/test/java/org/pdfsam/injector/QualifiedDependencyTest.java
=====================================
@@ -1,4 +1,20 @@
-package org.sejda.injector;
+/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
+ * Licensed 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.pdfsam.injector;
import static org.junit.Assert.assertEquals;
@@ -9,9 +25,9 @@ import javax.inject.Inject;
import javax.inject.Qualifier;
import org.junit.Test;
-import org.sejda.injector.Injector;
-import org.sejda.injector.Key;
-import org.sejda.injector.Provides;
+import org.pdfsam.injector.Injector;
+import org.pdfsam.injector.Key;
+import org.pdfsam.injector.Provides;
public class QualifiedDependencyTest {
@Test
=====================================
src/test/java/org/sejda/injector/SingletonTest.java → src/test/java/org/pdfsam/injector/SingletonTest.java
=====================================
@@ -1,4 +1,20 @@
-package org.sejda.injector;
+/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
+ * Licensed 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.pdfsam.injector;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
@@ -6,9 +22,9 @@ import static org.junit.Assert.assertNotEquals;
import javax.inject.Provider;
import org.junit.Test;
-import org.sejda.injector.Injector;
-import org.sejda.injector.Prototype;
-import org.sejda.injector.Provides;
+import org.pdfsam.injector.Injector;
+import org.pdfsam.injector.Prototype;
+import org.pdfsam.injector.Provides;
public class SingletonTest {
@Test
=====================================
src/test/java/org/sejda/injector/TransitiveDependencyTest.java → src/test/java/org/pdfsam/injector/TransitiveDependencyTest.java
=====================================
@@ -1,11 +1,27 @@
-package org.sejda.injector;
+/*
+ * This file is part of the PDF Split And Merge source code
+ * Copyright 2020 by Sober Lemur S.a.s di Vacondio Andrea (info at pdfsam.org).
+ *
+ * Licensed 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.pdfsam.injector;
import static org.junit.Assert.assertNotNull;
import javax.inject.Inject;
import org.junit.Test;
-import org.sejda.injector.Injector;
+import org.pdfsam.injector.Injector;
public class TransitiveDependencyTest {
@Test
=====================================
src/test/java/org/sejda/injector/AmbiguousModuleTest.java deleted
=====================================
@@ -1,25 +0,0 @@
-package org.sejda.injector;
-
-import org.junit.Test;
-import org.sejda.injector.InjectionException;
-import org.sejda.injector.Injector;
-import org.sejda.injector.Provides;
-
-public class AmbiguousModuleTest {
- @Test(expected = InjectionException.class)
- public void ambiguousModule() {
- Injector.start(new Module());
- }
-
- public static class Module {
- @Provides
- String foo() {
- return "foo";
- }
-
- @Provides
- String bar() {
- return "bar";
- }
- }
-}
View it on GitLab: https://salsa.debian.org/java-team/libsejda-injector-java/-/commit/5c50c002ee40797f2abd97fada910b6aae96d09b
--
View it on GitLab: https://salsa.debian.org/java-team/libsejda-injector-java/-/commit/5c50c002ee40797f2abd97fada910b6aae96d09b
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20200925/c7eb7158/attachment.html>
More information about the pkg-java-commits
mailing list