eclipse-ee4j / glassfish

Eclipse GlassFish
https://eclipse-ee4j.github.io/glassfish/
385 stars 143 forks source link

Java EE 6 API in the Maven repository has an incorrect method. #21226

Closed glassfishrobot closed 4 years ago

glassfishrobot commented 10 years ago

I am not sure you are responsible to correct the error, but the Java EE 6 API registered in the Mave repository has an incorrect method in interface javax.enterprise.inject.spi.BeforeBeanDiscovery. It is specified in the API document to have the following method:

void addInterceptorBinding(java.lang.Class<? extends java.lang.annotation.Annotation> bindingType, java.lang.annotation.Annotation... bindingTypeDef)

But the one from the Mave repository has this one instead:

void addInterceptorBinding(Class<? extends Annotation> type)

This may cause false compilation errors in some programs. It should be updated to match the API document..

Environment

OS: Windows 7 (x64) Java: JDK 8, Java(TM) SE Runtime Environment 1.8.0_11-b12 IDE: Netbeans IDE 8.0.1

glassfishrobot commented 6 years ago
glassfishrobot commented 10 years ago

@glassfishrobot Commented @romain-grecourt said: There is no "javadoc" artifact for the official EE6 API maven artifact: javax.javaee:javaee-api:6.0. Can you please provide maven coordinates for these artifacts (include the so-called API document)?

glassfishrobot commented 10 years ago

@glassfishrobot Commented kazssym said: The API document at http://docs.oracle.com/javaee/6/api/javax/enterprise/inject/spi/BeforeBeanDiscovery.html#addInterceptorBinding(java.lang.Class,%20java.lang.annotation.Annotation describes the former is correct and one of projects I have fails with the javaee-api 6.0 dependency. To make it builds successful, I must add another dependency on cdi-api 1.0-SP4 to override the interface definition in javaee-api 6.0. AFAIK, the Java EE 6 API includes the CDI 1.0 specification, doesn't it?

glassfishrobot commented 10 years ago

@glassfishrobot Commented @romain-grecourt said: cdi-1.0 (javax.enterprise:cdi-api:1.0:jar) is what is included in the javaee6 api jar:

> javap -cp ./javaee-api-6.0.jar javax.enterprise.inject.spi.BeforeBeanDiscovery

public interface javax.enterprise.inject.spi.BeforeBeanDiscovery {
  public abstract void addQualifier(java.lang.Class<? extends java.lang.annotation.Annotation>);
  public abstract void addScope(java.lang.Class<? extends java.lang.annotation.Annotation>, boolean, boolean);
  public abstract void addStereotype(java.lang.Class<? extends java.lang.annotation.Annotation>, java.lang.annotation.Annotation...);
  public abstract void addInterceptorBinding(java.lang.Class<? extends java.lang.annotation.Annotation>);
  public abstract void addAnnotatedType(javax.enterprise.inject.spi.AnnotatedType<?>);
}

> javap -cp ./cdi-api-1.0.jar javax.enterprise.inject.spi.BeforeBeanDiscovery

public interface javax.enterprise.inject.spi.BeforeBeanDiscovery {
  public abstract void addQualifier(java.lang.Class<? extends java.lang.annotation.Annotation>);
  public abstract void addScope(java.lang.Class<? extends java.lang.annotation.Annotation>, boolean, boolean);
  public abstract void addStereotype(java.lang.Class<? extends java.lang.annotation.Annotation>, java.lang.annotation.Annotation...);
  public abstract void addInterceptorBinding(java.lang.Class<? extends java.lang.annotation.Annotation>);
  public abstract void addAnnotatedType(javax.enterprise.inject.spi.AnnotatedType<?>);
}

However, there is indeed a discrepancy between the official javadoc and the API artifact (javax.javaee:javaee-api:6.0:jar). I will follow-up on that.

glassfishrobot commented 9 years ago

@glassfishrobot Commented @romain-grecourt said: linking to #11389 as this will require an update to the EE6 combined maven artifacts.

glassfishrobot commented 10 years ago

@glassfishrobot Commented Issue-Links: relates to GLASSFISH-11389

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-21226

glassfishrobot commented 10 years ago

@glassfishrobot Commented Reported by kazssym

github-actions[bot] commented 4 years ago

This issue has been marked as inactive and old and will be closed in 7 days if there is no further activity. If you want the issue to remain open please add a comment