Accepting request 963080 from Java:packages

Fix build with jdk 17

OBS-URL: https://build.opensuse.org/request/show/963080
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/atinject?expand=0&rev=2
This commit is contained in:
Dominique Leuenberger 2022-03-19 21:20:54 +00:00 committed by Git OBS Bridge
commit 6c9ccc21e1
3 changed files with 122 additions and 5 deletions

107
atinject-javadoc.patch Normal file
View File

@ -0,0 +1,107 @@
--- atinject-1/src/javax/inject/Inject.java 2022-03-19 14:42:45.820084838 +0100
+++ atinject-1/src/javax/inject/Inject.java 2022-03-19 17:20:21.093084432 +0100
@@ -36,23 +36,23 @@
* zero or more dependencies as arguments. {@code @Inject} can apply to at most
* one constructor per class.
*
- * <p><tt><blockquote style="padding-left: 2em; text-indent: -2em;">@Inject
+ * <p><blockquote style="padding-left: 2em; text-indent: -2em;"><code>@Inject
* <i>ConstructorModifiers<sub>opt</sub></i>
* <i>SimpleTypeName</i>(<i>FormalParameterList<sub>opt</sub></i>)
* <i>Throws<sub>opt</sub></i>
- * <i>ConstructorBody</i></blockquote></tt>
+ * <i>ConstructorBody</i></code></blockquote>
*
* <p>{@code @Inject} is optional for public, no-argument constructors when no
* other constructors are present. This enables injectors to invoke default
* constructors.
*
- * <p><tt><blockquote style="padding-left: 2em; text-indent: -2em;">
+ * <blockquote style="padding-left: 2em; text-indent: -2em;"><code>
* {@literal @}Inject<sub><i>opt</i></sub>
* <i>Annotations<sub>opt</sub></i>
* public
* <i>SimpleTypeName</i>()
* <i>Throws<sub>opt</sub></i>
- * <i>ConstructorBody</i></blockquote></tt>
+ * <i>ConstructorBody</i></code></blockquote>
*
* <p>Injectable fields:
* <ul>
@@ -60,10 +60,10 @@
* <li>are not final.
* <li>may have any otherwise valid name.</li></ul>
*
- * <p><tt><blockquote style="padding-left: 2em; text-indent: -2em;">@Inject
+ * <blockquote style="padding-left: 2em; text-indent: -2em;"><code>@Inject
* <i>FieldModifiers<sub>opt</sub></i>
* <i>Type</i>
- * <i>VariableDeclarators</i>;</blockquote></tt>
+ * <i>VariableDeclarators</i>;</code></blockquote>
*
* <p>Injectable methods:
* <ul>
@@ -74,12 +74,12 @@
* <li>may have any otherwise valid name.</li>
* <li>accept zero or more dependencies as arguments.</li></ul>
*
- * <p><tt><blockquote style="padding-left: 2em; text-indent: -2em;">@Inject
+ * <p><blockquote style="padding-left: 2em; text-indent: -2em;"><code>@Inject
* <i>MethodModifiers<sub>opt</sub></i>
* <i>ResultType</i>
* <i>Identifier</i>(<i>FormalParameterList<sub>opt</sub></i>)
* <i>Throws<sub>opt</sub></i>
- * <i>MethodBody</i></blockquote></tt>
+ * <i>MethodBody</i></code></blockquote>
*
* <p>The injector ignores the result of an injected method, but
* non-{@code void} return types are allowed to support use of the method in
@@ -107,11 +107,11 @@
*
* <p>Injection of members annotated with {@code @Inject} is required. While an
* injectable member may use any accessibility modifier (including
- * <tt>private</tt>), platform or injector limitations (like security
+ * <code>private</code>), platform or injector limitations (like security
* restrictions or lack of reflection support) might preclude injection
* of non-public members.
*
- * <h3>Qualifiers</h3>
+ * <h2>Qualifiers</h2>
*
* <p>A {@linkplain Qualifier qualifier} may annotate an injectable field
* or parameter and, combined with the type, identify the implementation to
--- atinject-1/src/javax/inject/package-info.java 2022-03-19 14:42:45.820084838 +0100
+++ atinject-1/src/javax/inject/package-info.java 2022-03-19 17:21:38.093548148 +0100
@@ -21,8 +21,8 @@
* locators (e.g., JNDI).&nbsp;This process, known as <i>dependency
* injection</i>, is beneficial to most nontrivial applications.
*
- * <p>Many types depend on other types. For example, a <tt>Stopwatch</tt> might
- * depend on a <tt>TimeSource</tt>. The types on which a type depends are
+ * <p>Many types depend on other types. For example, a <code>Stopwatch</code> might
+ * depend on a <code>TimeSource</code>. The types on which a type depends are
* known as its <i>dependencies</i>. The process of finding an instance of a
* dependency to use at run time is known as <i>resolving</i> the dependency.
* If no such instance can be found, the dependency is said to be
@@ -100,7 +100,7 @@
*
* <p>The injector further passes dependencies to other dependencies until it
* constructs the entire object graph. For example, suppose the programmer
- * asked an injector to create a <tt>StopwatchWidget</tt> instance:
+ * asked an injector to create a <code>StopwatchWidget</code> instance:
*
* <pre> /** GUI for a Stopwatch &#42;/
* class StopwatchWidget {
@@ -110,9 +110,9 @@
*
* <p>The injector might:
* <ol>
- * <li>Find a <tt>TimeSource</tt>
- * <li>Construct a <tt>Stopwatch</tt> with the <tt>TimeSource</tt>
- * <li>Construct a <tt>StopwatchWidget</tt> with the <tt>Stopwatch</tt>
+ * <li>Find a <code>TimeSource</code>
+ * <li>Construct a <code>Stopwatch</code> with the <code>TimeSource</code>
+ * <li>Construct a <code>StopwatchWidget</code> with the <code>Stopwatch</code>
* </ol>
*
* <p>This leaves the programmer's code clean, flexible, and relatively free

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Sat Mar 19 16:24:33 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Build with source/target levels 8
- Added patch:
* atinject-javadoc.patch
+ fix build with javadoc 17
-------------------------------------------------------------------
Wed Oct 24 21:00:03 UTC 2018 - Fridrich Strba <fstrba@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package atinject
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -25,7 +25,7 @@ Release: 0
Summary: Dependency injection specification for Java (JSR-330)
License: Apache-2.0
Group: Development/Libraries/Java
URL: http://javax-inject.github.io/javax-inject/
URL: https://javax-inject.github.io/javax-inject/
# git clone --bare git@github.com:javax-inject/javax-inject
# git --git-dir=javax-inject.git archive --prefix %{name}-%{base_version}/ --format tar %{git_tag} | xz >%{name}-%{base_version}.tar.xz
Source0: %{name}-%{base_version}.tar.xz
@ -33,8 +33,9 @@ Source0: %{name}-%{base_version}.tar.xz
Source1: MANIFEST.MF
Source2: MANIFEST-TCK.MF
Source3: http://www.apache.org/licenses/LICENSE-2.0.txt
Patch0: atinject-javadoc.patch
BuildRequires: fdupes
BuildRequires: java-devel > 1.6
BuildRequires: java-devel > 1.8
BuildRequires: javapackages-local
BuildRequires: junit
BuildRequires: xz
@ -65,6 +66,7 @@ API documentation for %{name}.
%prep
%setup -q -n %{name}-%{base_version}
%patch0 -p1
cp %{SOURCE3} LICENSE
rm -rf lib/*
build-jar-repository -p lib junit
@ -76,8 +78,8 @@ sed -i -e 's/pom\.groupId/project.groupId/' tck-pom.xml
set -e
alias rm=:
alias xargs=:
alias javadoc='javadoc -source 6 -notimestamp'
alias javac='javac -source 6 -target 6'
alias javadoc='javadoc -source 8 -notimestamp'
alias javac='javac -source 8 -target 8'
. ./build.sh
# Inject OSGi manifests required by Eclipse.