Can you share your functional interface code?

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/peergos/shared/corenode/HTTPCoreNode.java
>  
>   -  the getUsername method)
> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to