• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

PortingAcceptanceNotifyEndpoint is not abstract and does not override abstract

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

so my error is:



which indicate that i did not implement or did not implement properly method cancelPortingNotify.

I would like to know what I am doing wrong:








My implementation:



thank you
 
Marshal
Posts: 71070
292
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you are overloading the method in question; if you overrode it, it would have the same signature including the same parameters. You have different parameter types.
 
miha zoubek
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:I think you are overloading the method in question; if you overrode it, it would have the same signature including the same parameters. You have different parameter types.




Hmm, but method calncePortingNotify has the same types defined as "public class CancelPortingNotify". Can you maybe show me how this would be right? tnx

 
Campbell Ritchie
Marshal
Posts: 71070
292
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

miha zoubek wrote:. . . calncePortingNotify has the same types defined . . .

Please avoid abbreviations like “thx”.

Let's delete the package names and annotations, and reduce the method declaration in the interface toWhat you showed isYes, they look the same.
What you showed in your first post however had only one parameter, so that is an overloaded method rather than overridden.Why does your line 10 have a semicolon at the end? That won't compile. Did you declare the method with public access? Remember interface methods are implicitly public unless marked private.
 
Rancher
Posts: 4743
50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is your method defined in the interface (I've removed the annotations and package names for clarity):

And this is the method defined in you implementation:

They are clearly not the same, so that latter is not an implementation of the former...hence the error you  get.
Either the interface needs to use the CancelPortNotify class as its parameter, or the implementation needs to have a version that takes all those parameters in and creates its own.
 
reply
    Bookmark Topic Watch Topic
  • New Topic