Issue #1691: Enhancer option -s works not as expected

Type: Bug ReoprtVersion: 2.6.2Priority: NormalStatus: ClosedReplies: 1
#1

We found a bug in the enhancer with the option -s .


Given structure:

com
|- btc
|-   |- base
|-   |-   |- impl
|-   |-   |-   |- Entity1.class
|-   |-   |-   |- NonPersistableClass.class
|-   |-   |-   |- subpackage
|-   |-   |-   |-   |- Entity2.class

 

... com.objectdb.Enhancer -noaware -s com.btc.base.impl.*

Entity1 and Entity2 enhanced as expected.

... com.objectdb.Enhancer -noaware -s com.btc.base.*

Entity1 and Entity2 enhanced as expected.

BUT:

... com.objectdb.Enhancer -noaware -s com.btc.*

Nothing enhanced. This we did not expected.

#2

This is not a bug, but maybe a feature request.

The enhancer supports specifying classes for enhancement either as packages and classes or as files.

The -s attribute is for searching files in subdirectories when files are specified for enhancement, e.g.

... com.objectdb.Enhancer -noaware -s c:\my-project\bin\*.class

but should not use to cover sub packages. As in Java import statements, there is no wildcard for covering sub packages, and you have to specify each package and sub package explicitly, e.g.

... com.objectdb.Enhancer -noaware com.btc.* com.btc.base.*

Since specifying each sub package should be good enough, it seems that investing time now in other options would not be justified.

ObjectDB Support

Reply