Skip to content

Commit

Permalink
Begin migration to Jakarta Annotations (#6161)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Jan 7, 2022
1 parent 72d38d2 commit dd0db18
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/hudson/ExtensionFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
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;
Expand All @@ -56,7 +57,6 @@
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;
Expand Down Expand Up @@ -580,7 +580,7 @@ public <T> void onProvision(ProvisionInvocation<T> provision) {
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();
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/PersistentDescriptor.java
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/triggers/SCMTrigger.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
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;
Expand All @@ -71,7 +72,6 @@
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;
Expand Down

0 comments on commit dd0db18

Please sign in to comment.