+1 on Martin's suggestion!
How about the following rewording?
 "If an explicit bean archive contains the `<trim/>` element in its `beans.xml` file, then for a type to be discovered it must have either a
scope annotation (normal or pseudo) or a bean defining annotation (as defined in <<bean_defining_annotations>>)"

=>
 "If an explicit bean archive contains the `<trim/>` element in its `beans.xml` file, then for a class to be discovered as a bean it must have either a scope annotation (normal or pseudo) or a bean defining annotation (as defined in <<bean_defining_annotations>>)"

Many thanks,
Emily
===========================
Emily Jiang
WebSphere Application Server, CDI Development Lead

 
MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN
Phone:  +44 (0)1962 816278  Internal: 246278

Email: emijiang@uk.ibm.com
Lotus Notes: Emily Jiang/UK/IBM@IBMGB




From:        Martin Kouba <mkouba@redhat.com>
To:        John Ament <john.ament@spartasystems.com>, Antoine Sabot-Durand <antoine@sabot-durand.net>, CDI Java EE Specification <cdi-dev@lists.jboss.org>
Date:        21/11/2016 14:34
Subject:        Re: [cdi-dev] Need native speaker for CDI-420 (trim) reword
Sent by:        cdi-dev-bounces@lists.jboss.org




Well, we're discussing the spec wording which should be clear and
accurate. What users follow or not is a different thing, and should be
covered in tutorials, blogposts and docs.

To sum it up:

* type discovery is covered in "12.4.1. Type discovery"
* the "trimming" process happens AFTER type discovery and BEFORE bean
discovery ("12.4.3. Bean discovery")

Therefore, we cannot say that "for a type to be discovered it must
have..." because for trimmed archives the type is always discovered and
then, if it does not meet the conditions, thrown away (no beans are
created from it).

Martin

Dne 21.11.2016 v 14:53 John Ament napsal(a):
> What you're referring to is a nuance that most users don't follow.  A
> PAT is fired for essentially every class found.  If this works
> differently (e.g. for bean-discovery-mode=none) then it may be worth
> calling this out, but as of now it should be implicit that PAT works
> differently.
>
>
> John
>
>
>
> ------------------------------------------------------------------------
> *From:* Antoine Sabot-Durand <antoine@sabot-durand.net>
> *Sent:* Monday, November 21, 2016 5:07 AM
> *To:* Martin Kouba; John Ament; CDI Java EE Specification
> *Subject:* Re: [cdi-dev] Need native speaker for CDI-420 (trim) reword
>
> +1 for Martin. I didn't read with enough attention. All Types should be
> discovered like in All bean-discovery mode , but only those with bean
> defining annotation or scope should be eligible to become beans.
>
> On Mon, Nov 21, 2016 at 9:15 AM Martin Kouba <mkouba@redhat.com
> <
mailto:mkouba@redhat.com>> wrote:
>
>     Hi John,
>
>     sounds good but is not entirely correct because those type ARE actually
>     discovered (ProcessAnnotatedType is fired etc.) and then removed (if
>     necessary) from the set of discovered types before the "Bean discovery"
>     phase.
>
>     Martin
>
>     Dne 18.11.2016 v 16:50 John Ament napsal(a):
>     > Here's my take..
>     >
>     >
>     > "If an explicit bean archive contains the `<trim/>` element in its
>     > `beans.xml` file, then for a type to be discovered it must have
>     either a
>     > scope annotation (normal or pseudo) or a bean defining annotation (as
>     > defined in <<bean_defining_annotations>>)"
>     >
>     >
>     > John
>     >
>     >
>     >
>     >
>     ------------------------------------------------------------------------
>     > *From:* cdi-dev-bounces@lists.jboss.org
>     <
mailto:cdi-dev-bounces@lists.jboss.org>
>     > <cdi-dev-bounces@lists.jboss.org
>     <
mailto:cdi-dev-bounces@lists.jboss.org>> on behalf of Antoine
>     Sabot-Durand
>     > <antoine@sabot-durand.net <
mailto:antoine@sabot-durand.net>>
>     > *Sent:* Friday, November 18, 2016 9:30 AM
>     > *To:* CDI Java EE Specification
>     > *Subject:* [cdi-dev] Need native speaker for CDI-420 (trim) reword
>     >
>     > Hi all,
>     >
>     >
>     > With Martin, we reword the <trim/> section like:
>     >
>     > "If an explicit bean archive contains the `<trim/>` element in its
>     > `beans.xml` file, types that don't have either a bean defining
>     > annotation (as defined in <<bean_defining_annotations>>) or any scope
>     > annotation, are removed from the set of discovered types."
>     >
>     > Grammar feedback from native speaker is most welcome.
>     >
>     > Antoine
>     >
>     ------------------------------------------------------------------------
>     > NOTICE: This e-mail message and any attachments may contain
>     > confidential, proprietary, and/or privileged information which
>     should be
>     > treated accordingly. If you are not the intended recipient, please
>     > notify the sender immediately by return e-mail, delete this
>     message, and
>     > destroy all physical and electronic copies. Thank you.
>     >
>     >
>     > _______________________________________________
>     > cdi-dev mailing list
>     > cdi-dev@lists.jboss.org <
mailto:cdi-dev@lists.jboss.org>
>     >
https://lists.jboss.org/mailman/listinfo/cdi-dev
>     >
>     > Note that for all code provided on this list, the provider
>     licenses the code under the Apache License, Version 2
>     (
http://www.apache.org/licenses/LICENSE-2.0.html). For all other
>     ideas provided on this list, the provider waives all patent and
>     other intellectual property rights inherent in such information.
>     >
>
>     --
>     Martin Kouba
>     Software Engineer
>     Red Hat, Czech Republic
>
> ------------------------------------------------------------------------
> NOTICE: This e-mail message and any attachments may contain
> confidential, proprietary, and/or privileged information which should be
> treated accordingly. If you are not the intended recipient, please
> notify the sender immediately by return e-mail, delete this message, and
> destroy all physical and electronic copies. Thank you.

--
Martin Kouba
Software Engineer
Red Hat, Czech Republic
_______________________________________________
cdi-dev mailing list
cdi-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/cdi-dev

Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (
http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.



Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU