Commit 51f54f0d authored by Romain Bioteau's avatar Romain Bioteau
Browse files

fix builder generic type

parent 5eab0fd6
......@@ -28,9 +28,8 @@ import org.bonitasoft.studio.model.process.ProcessFactory;
*/
public class ActivityBuilder<T extends Activity, B extends ActivityBuilder<T, B>> extends FlowElementBuilder<T, B> {
@SuppressWarnings("rawtypes")
public static ActivityBuilder<?, ?> create() {
return new ActivityBuilder();
public static <T extends Activity, B extends ActivityBuilder<T, B>> ActivityBuilder<T, B> create() {
return new ActivityBuilder<T,B>();
}
public B withDuration(final String duration) {
......
......@@ -25,6 +25,7 @@ import org.bonitasoft.studio.model.process.ProcessFactory;
*/
public class BusinessObjectDataBuilder extends JavaObjectDataBuilder<BusinessObjectData, BusinessObjectDataBuilder> {
@SuppressWarnings("unchecked")
public static BusinessObjectDataBuilder create() {
return new BusinessObjectDataBuilder();
}
......
......@@ -26,9 +26,8 @@ import org.bonitasoft.studio.model.process.ProcessFactory;
*/
public class DataBuilder<T extends Data, B extends DataBuilder<T, B>> extends ElementBuilder<T, B> {
@SuppressWarnings("rawtypes")
public static DataBuilder<?, ?> create() {
return new DataBuilder();
public static <T extends Data, B extends DataBuilder<T, B>> DataBuilder<T, B> create() {
return new DataBuilder<T, B>();
}
public B withDatasourceId(final String datasourceId) {
......
......@@ -25,9 +25,8 @@ import org.bonitasoft.studio.model.process.ProcessFactory;
*/
public class JavaObjectDataBuilder<T extends JavaObjectData, B extends JavaObjectDataBuilder<T, B>> extends DataBuilder<T, B> {
@SuppressWarnings("rawtypes")
public static JavaObjectDataBuilder<?, ?> create() {
return new JavaObjectDataBuilder();
public static <T extends JavaObjectData, B extends JavaObjectDataBuilder<T, B>> JavaObjectDataBuilder<T, B> create() {
return new JavaObjectDataBuilder<T, B>();
}
public B withClassname(final String classname) {
......
......@@ -26,6 +26,7 @@ import org.bonitasoft.studio.model.process.Task;
*/
public class TaskBuilder extends ActivityBuilder<Task, TaskBuilder> {
@SuppressWarnings("unchecked")
public static TaskBuilder create() {
return new TaskBuilder();
}
......
......@@ -25,6 +25,7 @@ import org.bonitasoft.studio.model.process.XMLData;
*/
public class XMLDataBuilder extends DataBuilder<XMLData, XMLDataBuilder> {
@SuppressWarnings("unchecked")
public static XMLDataBuilder create() {
return new XMLDataBuilder();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment