question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

createJavaObjectArray() is allowed without explicit type arguments

See original GitHub issue

As discussed on gitter, it’s possible to call createJavaObjectArray without explicit type arguments, which might lead to ClassCastExceptions at runtime:

typeParameters => createJavaObjectArray({}); // expected to return `ObjectArray<PsiTypeParameter>`
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lcom.intellij.psi.PsiTypeParameter;
    at org.intellij.plugins.ceylon.ide.ceylonCode.lightpsi.CeyLightToplevelFunction.getTypeParameters(CeyLightToplevelFunction.ceylon:155)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
bjansencommented, Aug 25, 2016

Here, have a Pony http://www.ponylang.org/

0reactions
FroMagecommented, Aug 25, 2016

Damnit. This is how we spell it in French 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why can't I create an array of a type parameter in Java?
Array declarations are required to have a reifiable type, and generics are not reifiable. From the documentation: the only type you can ...
Read more >
Java Programming Tutorial on Generics
Let us begin with a version without generics called MyArrayList , which is a linear data structure, similar to array, but resizable. For...
Read more >
Generic Methods - Java™ Tutorials
Generic methods allow type parameters to be used to express dependencies among the types of one or more arguments to a method and/or...
Read more >
The Problem With Creating Generic Arrays - SimplexaCode AG
(It's not allowed, because it doesn't make sense.) Always explicitly providing the class type makes using such a feature very cumbersome. See ...
Read more >
Java Part 9 Flashcards | Chegg.com
The second example leaves out the explicit type of the objects being ... specifies that only these kinds of argument types are allowed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found