Hello,
i am trying to learn modeler lib (commons-modeler-2.0.1) and i have do a couple
of tests with it.
I was pretty happy with it, but i have faced an issue with this object (see
test class)
I got a "javax.management.RuntimeOperationsException: Field value invalid:
name=" exception
Also, i have found that removing the method
public final T get() { return null; }
will solve the problem
Obviusly i can't remove the method with real-usage object :D
here is the test class, i have try to keep it small
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
package com.eg.util;
import org.apache.commons.modeler.Registry;
import java.util.Vector;
public abstract class Test<T extends Test.INNER> {
private final Vector<T> inners;
public static void main(String[] args) {
new Test(1, "abcd", false) {
@Override
protected INNER make() {
return null;
}
};
}
public Test(final long timeout, final String name, boolean log) {
try {
Registry.getRegistry(null, null).registerComponent(this,
"com.eg.util:type=Test,name=" + name, "Pool");
} catch (Throwable e) {
}
inners = new Vector<T>(5);
}
protected abstract T make();
public final T get() { return null; }
static public class INNER {}
}
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]