Aggregate compilation error in org.opendatakit.aggregate.client.widgets.EnumListBox method: getSelectedValue

In

org.opendatakit.aggregate.client.widgets.EnumListBox
following method:

public T getSelectedValue() {
int selectedIndex = getSelectedIndex();
if (selectedIndex > -1) {
return (T) Enum.valueOf(classType, getValue(selectedIndex));
} else {
return null;
}
}

Compiler error:
The return type is incompatible with ListBox.getSelectedValue()
EnumListBox.java
/eclipse-aggregate-gae/src/org/opendatakit/aggregate/client/widgets
line 30
Java Problem

I have not changed any code, I'm just trying to compile Aggregate as is.
Seems like some issue with generics or compiler preference setting the
devteam uses that I need to mimic in my eclipse.

Could you offer any help to resolve this?

Thanks
Jaideep

If it helps, I exported my Eclipse Java compiler preferences

#Sat May 02 15:52:41 IST 2015
/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.source=1.7
@org.eclipse.jdt.core=3.10.2.v20150120-1634
/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.compliance=1.7
!/=
file_export_version=3.0

··· On Saturday, May 2, 2015 at 3:32:23 PM UTC+5:30, Jaideep Baphna, CFA wrote: > > In > > org.opendatakit.aggregate.client.widgets.EnumListBox > following method: > > public T getSelectedValue() { > int selectedIndex = getSelectedIndex(); > if (selectedIndex > -1) { > return (T) Enum.valueOf(classType, getValue(selectedIndex)); > } else { > return null; > } > } > > *Compiler error:* > The return type is incompatible with ListBox.getSelectedValue() > EnumListBox.java > /eclipse-aggregate-gae/src/org/opendatakit/aggregate/client/widgets > line 30 > Java Problem > > > I have not changed any code, I'm just trying to compile Aggregate as is. > Seems like some issue with generics or compiler preference setting the > devteam uses that I need to mimic in my eclipse. > > Could you offer any help to resolve this? > > Thanks > Jaideep >

Double-check that you have pulled the latest code. This sounds like an
earlier or intermediate check-in after upgrading to GWT 2.7.0. The latest
code should have this fixed (I created a new API to return T, and left
getSelectedValue as returning a String).

··· On Sat, May 2, 2015 at 3:24 AM, Jaideep Baphna, CFA wrote:

If it helps, I exported my Eclipse Java compiler preferences

#Sat May 02 15:52:41 IST 2015

/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7

/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.enumIdentifier=error

/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.source=1.7
@org.eclipse.jdt.core=3.10.2.v20150120-1634

/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.compliance=1.7
!/=
file_export_version=3.0

On Saturday, May 2, 2015 at 3:32:23 PM UTC+5:30, Jaideep Baphna, CFA wrote:

In

org.opendatakit.aggregate.client.widgets.EnumListBox
following method:

public T getSelectedValue() {
int selectedIndex = getSelectedIndex();
if (selectedIndex > -1) {
return (T) Enum.valueOf(classType, getValue(selectedIndex));
} else {
return null;
}
}

Compiler error:
The return type is incompatible with ListBox.getSelectedValue()
EnumListBox.java
/eclipse-aggregate-gae/src/org/opendatakit/aggregate/client/widgets
line 30
Java Problem

I have not changed any code, I'm just trying to compile Aggregate as is.
Seems like some issue with generics or compiler preference setting the
devteam uses that I need to mimic in my eclipse.

Could you offer any help to resolve this?

Thanks
Jaideep

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Mitch, Thanks!

It must have been a pull of intermediate check-in. I checked-out all code
again and now it compiles.

The CONFIGURE.TXT instructions are super valuable. The dev setup
and technology stack is quite intimidating. BUT I just intend to skin
Aggregate for now. Please could you point out areas we should focus on.

Thanks again
Jaideep

··· >

This describes the package naming conventions:

https://code.google.com/p/opendatakit/wiki/AggregateSourceCodeOverview

··· On Sat, May 2, 2015 at 8:34 PM, Jaideep Baphna, CFA wrote:

Mitch, Thanks!

It must have been a pull of intermediate check-in. I checked-out all code
again and now it compiles.

The CONFIGURE.TXT instructions are super valuable. The dev setup
and technology stack is quite intimidating. BUT I just intend to skin
Aggregate for now. Please could you point out areas we should focus on.

Thanks again
Jaideep

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com