This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit cf8605a1aaeb1f377ca4dbd89343a6d3f133cec4 Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri Apr 14 11:37:11 2023 +0100 Code clean-up - no functional change --- java/javax/ejb/EJB.java | 7 ++++++- java/javax/mail/Session.java | 1 + java/javax/mail/internet/MimeMessage.java | 2 ++ java/javax/persistence/PersistenceContext.java | 6 +++++- java/javax/persistence/PersistenceProperty.java | 1 + java/javax/persistence/PersistenceUnit.java | 3 ++- java/javax/transaction/Synchronization.java | 1 + java/javax/transaction/Transaction.java | 12 ++++-------- java/javax/transaction/TransactionManager.java | 9 +++------ java/javax/transaction/UserTransaction.java | 6 ++---- java/javax/xml/ws/WebServiceRef.java | 6 +++++- 11 files changed, 32 insertions(+), 22 deletions(-) diff --git a/java/javax/ejb/EJB.java b/java/javax/ejb/EJB.java index bf37ba8b14..46b0aa23f6 100644 --- a/java/javax/ejb/EJB.java +++ b/java/javax/ejb/EJB.java @@ -21,15 +21,20 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -@Target({ElementType.METHOD, ElementType.TYPE, ElementType.FIELD}) +@Target({ ElementType.METHOD, ElementType.TYPE, ElementType.FIELD }) @Retention(RetentionPolicy.RUNTIME) public @interface EJB { String name() default ""; + String description() default ""; + @SuppressWarnings("rawtypes") // Can't use Class<?> because API needs to match specification Class beanInterface() default java.lang.Object.class; + String beanName() default ""; + String mappedName() default ""; + String lookup() default ""; } diff --git a/java/javax/mail/Session.java b/java/javax/mail/Session.java index a95a11b574..b409fa4110 100644 --- a/java/javax/mail/Session.java +++ b/java/javax/mail/Session.java @@ -23,6 +23,7 @@ public class Session { public static Session getInstance(Properties props, Authenticator auth) { return null; } + public static Session getInstance(Properties props) { return null; } diff --git a/java/javax/mail/internet/MimeMessage.java b/java/javax/mail/internet/MimeMessage.java index 25877302af..4945ffd8af 100644 --- a/java/javax/mail/internet/MimeMessage.java +++ b/java/javax/mail/internet/MimeMessage.java @@ -23,9 +23,11 @@ public class MimeMessage implements MimePart { public MimeMessage(Session session) { // Dummy implementation } + public void setFrom(InternetAddress from) { // Dummy implementation } + public void setSubject(String subject) { // Dummy implementation } diff --git a/java/javax/persistence/PersistenceContext.java b/java/javax/persistence/PersistenceContext.java index 428fa09cff..eb65739aef 100644 --- a/java/javax/persistence/PersistenceContext.java +++ b/java/javax/persistence/PersistenceContext.java @@ -21,13 +21,17 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD}) +@Target({ ElementType.TYPE, ElementType.METHOD, ElementType.FIELD }) @Retention(RetentionPolicy.RUNTIME) public @interface PersistenceContext { String name() default ""; + String unitName() default ""; + PersistenceContextType type() default PersistenceContextType.TRANSACTION; + PersistenceProperty[] properties() default {}; + SynchronizationType synchronization() default SynchronizationType.SYNCHRONIZED; } diff --git a/java/javax/persistence/PersistenceProperty.java b/java/javax/persistence/PersistenceProperty.java index 6379071b11..5a8643482d 100644 --- a/java/javax/persistence/PersistenceProperty.java +++ b/java/javax/persistence/PersistenceProperty.java @@ -25,5 +25,6 @@ import java.lang.annotation.Target; public @interface PersistenceProperty { String name(); + String value(); } diff --git a/java/javax/persistence/PersistenceUnit.java b/java/javax/persistence/PersistenceUnit.java index 54f5150c4b..5024f4159e 100644 --- a/java/javax/persistence/PersistenceUnit.java +++ b/java/javax/persistence/PersistenceUnit.java @@ -21,10 +21,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD}) +@Target({ ElementType.TYPE, ElementType.METHOD, ElementType.FIELD }) @Retention(RetentionPolicy.RUNTIME) public @interface PersistenceUnit { String name() default ""; + String unitName() default ""; } diff --git a/java/javax/transaction/Synchronization.java b/java/javax/transaction/Synchronization.java index e187126363..9efecfca18 100644 --- a/java/javax/transaction/Synchronization.java +++ b/java/javax/transaction/Synchronization.java @@ -18,5 +18,6 @@ package javax.transaction; public interface Synchronization { void beforeCompletion(); + void afterCompletion(int status); } diff --git a/java/javax/transaction/Transaction.java b/java/javax/transaction/Transaction.java index fb449dbe13..934b306390 100644 --- a/java/javax/transaction/Transaction.java +++ b/java/javax/transaction/Transaction.java @@ -20,20 +20,16 @@ import javax.transaction.xa.XAResource; public interface Transaction { - void commit() throws RollbackException, HeuristicMixedException, - HeuristicRollbackException, SecurityException, + void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException; - boolean delistResource(XAResource xaRes, int flag) - throws IllegalStateException, SystemException; + boolean delistResource(XAResource xaRes, int flag) throws IllegalStateException, SystemException; - boolean enlistResource(XAResource xaRes) - throws RollbackException, IllegalStateException, SystemException; + boolean enlistResource(XAResource xaRes) throws RollbackException, IllegalStateException, SystemException; int getStatus() throws SystemException; - void registerSynchronization(Synchronization sync) - throws RollbackException, IllegalStateException, SystemException; + void registerSynchronization(Synchronization sync) throws RollbackException, IllegalStateException, SystemException; void rollback() throws IllegalStateException, SystemException; diff --git a/java/javax/transaction/TransactionManager.java b/java/javax/transaction/TransactionManager.java index 450de6eb47..22364e505e 100644 --- a/java/javax/transaction/TransactionManager.java +++ b/java/javax/transaction/TransactionManager.java @@ -19,19 +19,16 @@ package javax.transaction; public interface TransactionManager { void begin() throws NotSupportedException, SystemException; - void commit() throws RollbackException, HeuristicMixedException, - HeuristicRollbackException, SecurityException, + void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException; int getStatus() throws SystemException; Transaction getTransaction() throws SystemException; - void resume(Transaction tobj) throws InvalidTransactionException, - IllegalStateException, SystemException; + void resume(Transaction tobj) throws InvalidTransactionException, IllegalStateException, SystemException; - void rollback() - throws IllegalStateException, SecurityException, SystemException; + void rollback() throws IllegalStateException, SecurityException, SystemException; void setRollbackOnly() throws IllegalStateException, SystemException; diff --git a/java/javax/transaction/UserTransaction.java b/java/javax/transaction/UserTransaction.java index b0cce4a244..af11b68701 100644 --- a/java/javax/transaction/UserTransaction.java +++ b/java/javax/transaction/UserTransaction.java @@ -19,12 +19,10 @@ package javax.transaction; public interface UserTransaction { void begin() throws NotSupportedException, SystemException; - void commit() throws RollbackException, HeuristicMixedException, - HeuristicRollbackException, SecurityException, + void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException; - void rollback() - throws IllegalStateException, SecurityException, SystemException; + void rollback() throws IllegalStateException, SecurityException, SystemException; void setRollbackOnly() throws IllegalStateException, SystemException; diff --git a/java/javax/xml/ws/WebServiceRef.java b/java/javax/xml/ws/WebServiceRef.java index 8106123a99..5edcbe4324 100644 --- a/java/javax/xml/ws/WebServiceRef.java +++ b/java/javax/xml/ws/WebServiceRef.java @@ -21,15 +21,19 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD}) +@Target({ ElementType.TYPE, ElementType.METHOD, ElementType.FIELD }) @Retention(RetentionPolicy.RUNTIME) public @interface WebServiceRef { String name() default ""; + @SuppressWarnings("rawtypes") // Can't use Class<?> because API needs to match specification Class type() default java.lang.Object.class; + @SuppressWarnings("rawtypes") // Can't use Class<?> because API needs to match specification Class value() default java.lang.Object.class; + String wsdlLocation() default ""; + String mappedName() default ""; } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org