• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Compile Error

 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having trouble figuring out what is wrong with the following statement: setSelectedCharges(new ArrayList<Long>(convertToLong(getSelectedFeatures())), ElementType.FEATURE);

The compile error is: OrderManager.java:[1733,7] error: method setSelectedCharges in class OrderManager cannot be applied to given types;

I am copying this statement and the related methods from another class. The statement compiles fine in the source class but not in the destination class. The methods have copied are:


 
Michael Piaser
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One difference between the two classes is the package statement. I don't know what it does. I don't have no if it has any bearing on my problem but I thought I'd mention it.

The working class has package com.voxportal.web.order;
The failing class has package com.voxportal.web.device;
 
Michael Piaser
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I figured it out. Somehow I copied the wrong SetSelectedCharges method. I copied the correct one and now that statement is compiling.
 
I guess everyone has an angle. Fine, what do you want? Just know that you cannot have this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic