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 8747039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:17:33+00:00 2026-06-13T12:17:33+00:00

Its more likely a subjective question. I wanted to create a sub class of

  • 0

Its more likely a subjective question. I wanted to create a sub class of a third party API to customize the behavior, but the problem is one of the method in API class is having default access specifier, and I am not allowed to override as my sub class is not in same package.

However, if I want a solution, I can put my subclass in same package as of API class and extend the method which has default access specifier. Third party jar file is licensed under a permissive X11 type license (which is similar to MIT License)

I am looking for answer for below queries

  1. Is that legal to create subclass outside third party jar( different jar file) but maintaining similar package conversion?

  2. Any known issue with this approach (even though same package name, I kept in two jars)( i just tested with stand alone unit test)

  3. How Class loaders of app servers behave in such scenario ( which jar file will be loaded first)

Apologies if my query(1) related to license is not applicable here.

Thanks in advance.

  • 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-06-13T12:17:33+00:00Added an answer on June 13, 2026 at 12:17 pm

    For (1): The X11 license basically says you can do anything with the software as long as you credit the authors and don’t sue them for breach of warranty. There is nothing illegal about what you suggest.

    While what you suggest should work, it’s hackish. The problem is that the third-party library is using an overly strict access specification for part of its API. The best way would be to submit a patch to the open-source project.

    Your patch should simply specifies the method in question as protected instead of package-private, which would allow it to be called by subclasses (as well as other classes in the library’s package, since protected includes package-private access). That way, it would also help other users of the library extend the class.

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

Sidebar

Related Questions

Its more of a best practices sort of question. Here it goes... I have
I have a class that retrieves its memeber (more or less 10 members) from
Double has range more than a 64-bit integer, but its precision is less dues
SO is telling me this question is subjective and likely to be closed. It
I know this question seems subjective but it's really pretty simple. As a long
Ok I do have a small messaging site for my client. Well its more
I have an Excel spreadsheet provided as a report, when really its more of
I need some help with overlaying views using the prism framework.Its a little more
I have a table in which each of its TD contains image (more precisely,
Does File.list() have a longer run time if there are more files in its

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.