Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6732105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:36:33+00:00 2026-05-26T10:36:33+00:00

In a java class, I have an overloaded method like this: method1(List<Details1HO> input){}; and

  • 0

In a java class, I have an overloaded method like this:

method1(List<Details1HO> input){};

and method1(List<Details2HO> input){};
Both Details2HO and Details1HO extend the same class DetailsHO.
RAD builds the class fine, but ant gives error:

name clash: method1(java.util.List<Details1HO>) and method2(java.util.List<Details1HO>) have the same erasure

The Java version is 1.5 both in ant and in RAD
EDIT: The methods have different return types
EDIT #2: Real error:

name clash: mapToDO(java.util.List<com.bmo.ctp.alerts.businessobjects.user.hibernate.DeliveryDomainRestrictionHO>) and mapToDO(java.util.List<com.bmo.ctp.alerts.businessobjects.subscription.hibernate.SubscriptionDetailsHO>) have the same erasure

Real declaration:

public static DeliveryDomainRestrictionDO[] mapToDO(List<DeliveryDomainRestrictionHO> deliveryDomainRestrictions){}

public static List<SubscriptionSummaryDO> mapToDO(List<SubscriptionDetailsHO> input) {}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:36:34+00:00Added an answer on May 26, 2026 at 10:36 am

    I’m surprised that RAD will build this; it shouldn’t. It’s not legal to have a class that looks like:

    class Foo {
      public void foo(List<A> as);
      public void foo(List<B> bs);
    }
    

    because, due to type erasure, they both have the exact same signature at runtime:

    class Foo {
      public void foo(List);
      public void foo(List);
    }
    

    When you have this sort of problem, it typically means you’re trying to do something more complicated than you actually need to 🙂 In any case, you will need to disambiguate these somehow.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a class of overloaded methods like this: class Foo { public
I have a (Java) class with operations like this: abstract class Holder { def
Problem Approch I have a class like this with a overloaded constructors Code <?php
Say we have a class like this: import java.net.URL import xml._ class SearchData(xml: Node)
So we have a java class with two ArrayLists of generics. It looks like
So I have declared a vector in my class header like this: ... private:
Is there a way for a Java class to have an awareness of its
Referring here A is a precompiled Java class (I also have the source file)
If I have a java class which is package-private (declared with class, not public
I have a java class: it.eng.ancona.view.RuoliView$TabElaborazioneFattureValidazione$ElencoDettaglioElaborazioneFattureValidazione$RigaElencoDettaglioElaborazioneFattureValidazione It's so long for multiple inner class. If

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.