Closed GoogleCodeExporter closed 9 years ago
Possible solution.
Source code which I use is:
http://code.google.com/p/gwt-test-utils/source/browse/src/framework/trunk/gwt-te
st-utils/src/main/java/com/octo/gwt/test/internal/patcher/tools/i18n/ConstantsIn
vocationHandler.java?spec=svn482&r=482
Possible solution (but better is to check first properties.get(methodName)
before calling clazz.getMethod(methodName)):
for (int i = 0; i < v.length; i++) {
String methodName = v[i];
try{
Method correspondingKeyMethod = clazz.getMethod(methodName);
if (correspondingKeyMethod == null) {
throw new RuntimeException("Cannot find method '" + methodName + "' in class [" + clazz.getName() + "]");
}
result.put(methodName, invoke(null, correspondingKeyMethod, null));
}catch(NoSuchMethodException exp){
result.put(methodName, properties.get(methodName));
}
}
Original comment by Andrzej....@gmail.com
on 5 Apr 2011 at 11:20
I really don't know what I've smoked when implementing the
@DefaultStringMapValue behaviour.
Thank you for this report, I'm fixing it by following the behaviour explained
here :
http://code.google.com/intl/fr-FR/webtoolkit/doc/latest/DevGuideI18nConstants.ht
ml
Original comment by gael.laz...@gmail.com
on 5 Apr 2011 at 4:20
This is now fixed on trunk :-)
Be carefull, a lot of modification have been done for the coming release. If
you checkout the trunk, be aware you will need to :
1) provide a META-INF/gwt-test-utils.properties file with at least a
'module-file' configured (for example in gwt-test-utils :
com/octo/gwt/test/GwtTestUtils.gwt.xml = module-file)
2) implement the GwtTest.getModuleName() method, just like in GWTTestCase.
It will be documented soon in the official wiki pages.
Could you give it a try to validate the issue has been fix with my
modifications ?
Original comment by gael.laz...@gmail.com
on 5 Apr 2011 at 4:26
Hello,
I tested with current code and it works. Many thanks.
/ajozwik
Original comment by Andrzej....@gmail.com
on 6 Apr 2011 at 10:30
Original comment by gael.laz...@gmail.com
on 9 Jun 2011 at 3:30
Original issue reported on code.google.com by
Andrzej....@gmail.com
on 5 Apr 2011 at 11:03