mirror of https://github.com/jenkinsci/jenkins.git
Begin migration to Jakarta Annotations (#6161)
This commit is contained in:
parent
72d38d2192
commit
dd0db180bf
|
@ -40,7 +40,7 @@ THE SOFTWARE.
|
|||
<properties>
|
||||
<asm.version>9.2</asm.version>
|
||||
<slf4jVersion>1.7.32</slf4jVersion>
|
||||
<stapler.version>1635.vb_0ddedb_739f2</stapler.version>
|
||||
<stapler.version>1638.v229a_24fa_b_17c</stapler.version>
|
||||
<groovy.version>2.4.21</groovy.version>
|
||||
</properties>
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ import com.google.inject.spi.ProvisionListener;
|
|||
import hudson.init.InitMilestone;
|
||||
import hudson.model.Descriptor;
|
||||
import hudson.model.Hudson;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.AnnotatedElement;
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -56,7 +57,6 @@ import java.util.logging.Level;
|
|||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.StreamSupport;
|
||||
import javax.annotation.PostConstruct;
|
||||
import jenkins.ExtensionComponentSet;
|
||||
import jenkins.ExtensionFilter;
|
||||
import jenkins.ExtensionRefreshException;
|
||||
|
@ -580,7 +580,7 @@ public abstract class ExtensionFinder implements ExtensionPoint {
|
|||
Arrays.stream(c.getDeclaredMethods())
|
||||
.map(m -> getMethodAndInterfaceDeclarations(m, interfaces))
|
||||
.flatMap(Collection::stream)
|
||||
.filter(m -> m.getAnnotation(PostConstruct.class) != null)
|
||||
.filter(m -> m.getAnnotation(PostConstruct.class) != null || m.getAnnotation(javax.annotation.PostConstruct.class) != null)
|
||||
.findFirst()
|
||||
.ifPresent(method -> methods.add(0, method));
|
||||
c = c.getSuperclass();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package hudson.model;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
|
||||
/**
|
||||
* Marker interface for Descriptors which use xml persistent data, and as such need to load from disk when instantiated.
|
||||
|
|
|
@ -50,6 +50,7 @@ import hudson.util.FormValidation;
|
|||
import hudson.util.NamingThreadFactory;
|
||||
import hudson.util.SequentialExecutionQueue;
|
||||
import hudson.util.StreamTaskListener;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
@ -71,7 +72,6 @@ import java.util.concurrent.ThreadFactory;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.annotation.PostConstruct;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.model.RunAction2;
|
||||
import jenkins.scm.SCMDecisionHandler;
|
||||
|
|
Loading…
Reference in New Issue