[
https://issues.apache.org/jira/browse/IGNITE-8856?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vyacheslav Koptilin updated IGNITE-8856:
----------------------------------------
Description:
Let's consider the following BinaryConfiguration:
{code:java}
<property name="binaryConfiguration">
<bean class="org.apache.ignite.configuration.BinaryConfiguration">
...
<property name="typeConfigurations">
<list>
<bean
class="org.apache.ignite.binary.BinaryTypeConfiguration">
<property name="typeName"
value="org.apache.ignite.examples.*"/>
<property name="nameMapper">
<bean
class="org.apache.ignite.binary.BinaryBasicNameMapper">
<constructor-arg type="boolean"
value="false"/>
</bean>
</property>
</bean>
</list>
</property>
</bean>
</property>
{code}
My intention is using custom BinaryBasicMapper for all classes in the specified
package and its sub packages,
but BinaryContext implementation matches only classes that reside in the
"org.apache.ignite.examples" package.
Classes from sub-packages are not matched, and therefore do not use the
specified BinaryBasicNameMapper.
*UPD:*
Well, it seems that the current behavior is not an error and was implemented in
this way intentionally.
On the other hand, I think it would be good to have the ability to specify
sub-packages as well.
For example, it can be achieved through the '**' pattern as follows:
||example||defenition||priority||
|org.apache.ignite.examples.TestClass|matches exactly the one class|the highest
priority|
|org.apache.ignite.examples.*|matches all classes in the given package|medium|
|org.apache.ignite.examples.**|matches all classes in the given package and its
sub-packages|low|
The proposed enhancement does not break the current behavior and allows to
specify a filter for sub-packages.
was:
Let's consider the following BinaryConfiguration:
{code:java}
<property name="binaryConfiguration">
<bean class="org.apache.ignite.configuration.BinaryConfiguration">
...
<property name="typeConfigurations">
<list>
<bean
class="org.apache.ignite.binary.BinaryTypeConfiguration">
<property name="typeName"
value="org.apache.ignite.examples.*"/>
<property name="nameMapper">
<bean
class="org.apache.ignite.binary.BinaryBasicNameMapper">
<constructor-arg type="boolean"
value="false"/>
</bean>
</property>
</bean>
</list>
</property>
</bean>
</property>
{code}
My intention is using custom BinaryBasicMapper for all classes in the specified
package and its sub packages,
but BinaryContext implementation matches only classes that reside in the
"org.apache.ignite.examples" package.
Classes from subpackages are not matched, and therefore do not use the
specified BinaryBasicNameMapper.
> Incorrect behavior of BinaryTypeConfiguration in case of using a wildcard for
> type names
> ----------------------------------------------------------------------------------------
>
> Key: IGNITE-8856
> URL: https://issues.apache.org/jira/browse/IGNITE-8856
> Project: Ignite
> Issue Type: Bug
> Components: general
> Affects Versions: 2.5
> Reporter: Vyacheslav Koptilin
> Assignee: Vyacheslav Koptilin
> Priority: Major
>
> Let's consider the following BinaryConfiguration:
> {code:java}
> <property name="binaryConfiguration">
> <bean class="org.apache.ignite.configuration.BinaryConfiguration">
> ...
> <property name="typeConfigurations">
> <list>
> <bean
> class="org.apache.ignite.binary.BinaryTypeConfiguration">
> <property name="typeName"
> value="org.apache.ignite.examples.*"/>
> <property name="nameMapper">
> <bean
> class="org.apache.ignite.binary.BinaryBasicNameMapper">
> <constructor-arg type="boolean"
> value="false"/>
> </bean>
> </property>
> </bean>
> </list>
> </property>
> </bean>
> </property>
> {code}
> My intention is using custom BinaryBasicMapper for all classes in the
> specified package and its sub packages,
> but BinaryContext implementation matches only classes that reside in the
> "org.apache.ignite.examples" package.
> Classes from sub-packages are not matched, and therefore do not use the
> specified BinaryBasicNameMapper.
> *UPD:*
> Well, it seems that the current behavior is not an error and was implemented
> in this way intentionally.
> On the other hand, I think it would be good to have the ability to specify
> sub-packages as well.
> For example, it can be achieved through the '**' pattern as follows:
> ||example||defenition||priority||
> |org.apache.ignite.examples.TestClass|matches exactly the one class|the
> highest priority|
> |org.apache.ignite.examples.*|matches all classes in the given package|medium|
> |org.apache.ignite.examples.**|matches all classes in the given package and
> its sub-packages|low|
> The proposed enhancement does not break the current behavior and allows to
> specify a filter for sub-packages.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)