Can you share your functional interface code?
On Tuesday, September 6, 2016 at 3:35:32 PM UTC-4, Ian Preston wrote:
-- On Tuesday, September 6, 2016 at 3:35:32 PM UTC-4, Ian Preston wrote:
Thank you for all your awesome work on GWT.I'm getting a lambda being compiled to an empty method. As the method is empty, it returns null, and the caller gets a null dereference. I'm using the latest HEAD from gwt github.The lambda is the following (the whole class is at https://github.com/Peergos/Peergos/blob/google/src/ - the getUsername method)peergos/shared/corenode/ HTTPCoreNode.java res -> {System.out.println("HttpCoreNode.getUsername2"); DataInputStream din = new DataInputStream(new ByteArrayInputStream(res));try {String username = Serialize.deserializeString(din, CoreNode.MAX_USERNAME_SIZE); return username;} catch (IOException e) {throw new RuntimeException(e);}}This is being compiled to this empty function:var com_google_gwt_lang_ClassLiteralHolder_Lpeergos_ 1shared_1corenode_ 1HTTPCoreNode$lambda$0$Type_ 12_1classLit = java_lang_Class_ createForClass__Ljava_lang_ String_2Ljava_lang_String_ 2Lcom_google_gwt_core_client_ JavaScriptObject_2Ljava_lang_ Class_2Ljava_lang_Class_2($ intern_74, 'HTTPCoreNode/lambda$0$Type', 268); function peergos_shared_corenode_HTTPCoreNode$lambda$1$Type_ HTTPCoreNode$lambda$1$Type__V( ){ }Am I doing something wrong? Any help very much appreciated.
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment