Hi Dev,
in Studio we have the following line of code:
configuration.setSupportedMechanisms( new ArrayList<String>( ( List<?
extends String> ) Arrays.asList(
supportedMechanismsTableViewer.getCheckedElements() ) ) );
The method configuration.setSupportedMechanisms expects an List<String>
parameter. The "supportedMechanismsTableViewer.getCheckedElements()"
returns an Object[].
Inside of eclipse this line is just marked with a warning: "Type safety:
Unchecked cast from List<Object> to List<? extends String>"
But when building from command line using ant I get the following error:
[javac]
/home/stefan/Documents/Apache/svn/studio/trunk2/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/GeneralPage.java:878:
inconvertible types
[javac] found : java.util.List<java.lang.Object>
[javac] required: java.util.List<? extends java.lang.String>
[javac] .asList(
supportedMechanismsTableViewer.getCheckedElements() ) ) );
The odd thing is if I just touch the java file (adding a space
somewhere) the compilation works!
Any idea what may be the problem here?
Here is the class:
http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/GeneralPage.java?view=markup&pathrev=596110
Regards,
Stefan