200 words

Issue #258 - Enhancer option -s works not as expected

BugVersion: 2.6.2Priority: NormalStatus: ClosedReplies: 1
2015-06-23 12:48

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

Given structure:

|- 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.


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

Nothing enhanced. This we did not expected.

btc_es's picture
Joined on 2014-10-20
User Post #56
2015-06-23 13:06

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support's picture
Joined on 2010-05-03
User Post #2,261

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Maximum file size: 32 MB