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.

Removepath ClassCastException

See original GitHub issue

I want to remove Path and I set points below

private ArrayList<double[]> points = new ArrayList<>();

{
    points.add( new double[] {620,1656} );
    points.add( new double[] {648, 1656} );
    points.add( new double[] {648, 1772} );
    points.add( new double[] {965, 1772} );
    points.add( new double[] {965, 2036} );
    points.add( new double[] {965, 2441} );
}

 CompositePathView.DrawablePath drawablePath = (CompositePathView.DrawablePath) points.subList(1, 5);
 tileView.removePath( drawablePath );

but it cause ClassCastException(AbstractList cannot be cast to Path)

Can you help me solve this question? or anything else method?

Thanks!

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
sos418commented, Oct 6, 2016

Oh! Thank you! You help me so much. I will revisit basic Java operations.

0reactions
moagriuscommented, Oct 6, 2016

you are drawing a path and then immediately removing it. you need to remove the path that’s already drawn, not create a new one and then remove it (which won’t do anything)

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to remove class cast exception in spring java?
I have written code that uses spring util namespace. I have a class named City with the following properties: private List<String> name; private ......
Read more >
"General error: java.lang.ClassCastException" when executing ...
ClassCastException " when executing batch update. 74 views ... ClassCastException: java.lang. ... removePath(Permission.java:216) at com.vtlr.backend.row.
Read more >
[h2] "General error: java.lang.ClassCastException" when executing ...
Hi, I am using H2 version 1.4.181. I am executing a PreparedStatement that takes 3 arguments (int, short, short) and when I do...
Read more >
MediaRouter.RouteGroup - Android Developers
addRoute; addRoute; getRouteAt; getRouteCount; removeRoute; removeRoute; requestSetVolume; requestUpdateVolume; setIconDrawable; setIconResource; toString.
Read more >
CamelContext (Camel :: API 3.0.0 API) - javadoc.io
... Throws: ClassCastException - is thrown if the type is not correct type ... boolean removeRoute(String routeId) throws Exception.
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