Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Apache Felix SCR Plugin Frequently Asked Questions

Table of Contents
locationtop
styledisc

Syntax Error when Enums are used?

During a SCR plugin run, a syntax error might occur if enums are used in the source code. This is a know problem of the used QDox version that reads the Java source files. Usually this happens when an enum is used inline and does not end with a ";". So adding this character should solve the problem:

No Format

public interface MyTest {

     /** more error codes may be added */
     enum Result {
 	OK, UNKNOWN, ERROR, DENIED
     };     // <!-- HERE
 
     /** @return the result */
     public void getResult(); 
  }