NullPointerException

50 views
Skip to first unread message

Evgeniy Martin

unread,
Mar 28, 2017, 9:55:31 AM3/28/17
to ceylon-users
HI,

After upgrading to version 3.2 I got an error.

For example:

shared class ExampleClass(
    shared
{String *} params = empty
) {}

shared
void test() {
   
print("Start");

   
Boolean haveNotParam(ExampleClass _class) => !_class.params.empty;
           
   
{ExampleClass*} manyClass = {ExampleClass({"param"})};
   
Boolean haveParam = manyClass.any(haveNotParam);
   
   
print("End");                
}Введите код...

after run test i see:

Start
ceylon run
: null
java
.lang.NullPointerException
    at com
.redhat.ceylon.compiler.java.language.ConstantIterable.getEmpty(ConstantIterable.java:62)
    at ru
.dellin.io.writer.json.test_$1haveNotParam_.haveNotParam(createJsonTable.ceylon:60)
    at ru
.dellin.io.writer.json.test_$2.$call$(createJsonTable.ceylon:63)
    at ru
.dellin.io.writer.json.test_$2.$call$(createJsonTable.ceylon:63)
    at ceylon
.language.Iterable$impl.any(Iterable.ceylon:971)
    at ceylon
.language.impl.BaseIterable.any(bases.ceylon)
    at ru
.dellin.io.writer.json.test_.test(createJsonTable.ceylon:63)
    at ru
.dellin.io.writer.json.test_.main(createJsonTable.ceylon)
    at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java
.lang.reflect.Method.invoke(Method.java:498)
    at ceylon
.modules.api.runtime.SecurityActions.invokeRunInternal(SecurityActions.java:57)
    at ceylon
.modules.api.runtime.SecurityActions.invokeRun(SecurityActions.java:48)
    at ceylon
.modules.api.runtime.AbstractRuntime.invokeRun(AbstractRuntime.java:68)
    at ceylon
.modules.api.runtime.AbstractRuntime.execute(AbstractRuntime.java:105)
    at ceylon
.modules.api.runtime.AbstractRuntime.execute(AbstractRuntime.java:101)
    at ceylon
.modules.Main.execute(Main.java:69)
    at ceylon
.modules.Main.main(Main.java:42)
    at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java
.lang.reflect.Method.invoke(Method.java:498)
    at org
.jboss.modules.Module.run(Module.java:308)
    at org
.jboss.modules.Main.main(Main.java:487)
    at ceylon
.modules.bootstrap.CeylonRunTool.run(CeylonRunTool.java:355)
    at com
.redhat.ceylon.common.tools.CeylonTool.run(CeylonTool.java:547)
    at com
.redhat.ceylon.common.tools.CeylonTool.execute(CeylonTool.java:423)
    at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java
.lang.reflect.Method.invoke(Method.java:498)
    at com
.redhat.ceylon.launcher.Launcher.runInJava7Checked(Launcher.java:108)
    at com
.redhat.ceylon.launcher.Launcher.run(Launcher.java:38)
    at com
.redhat.ceylon.launcher.Launcher.run(Launcher.java:31)
    at com
.redhat.ceylon.launcher.Launcher.main(Launcher.java:24)Введите код...

Gavin King

unread,
Mar 28, 2017, 10:23:53 AM3/28/17
to ceylon...@googlegroups.com
Looks to me like this bug was already fixed 13 days ago by Jordi.
> --
> You received this message because you are subscribed to the Google Groups
> "ceylon-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ceylon-users...@googlegroups.com.
> To post to this group, send email to ceylon...@googlegroups.com.
> Visit this group at https://groups.google.com/group/ceylon-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ceylon-users/af7ebe38-7c89-4f0f-8aff-3790f8b3d9c1%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Gavin King
ga...@ceylon-lang.org
http://profiles.google.com/gavin.king
http://ceylon-lang.org
http://hibernate.org
http://seamframework.org
Reply all
Reply to author
Forward
0 new messages