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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:17:41+00:00 2026-05-28T01:17:41+00:00

I am working on a legacy framework and apparently there are two libraries, which

  • 0

I am working on a legacy framework and apparently there are two libraries, which are inter-dependent. By that I mean libA import from libB, and libB import from libA. First i think it is a terrible design, but why would somebody do something like this? Rather which conditions can lead somebody to write this ?

edit:

Each library depends on classes in the other, so they do import packages and have the other library jar in their build path.

  • 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-28T01:17:41+00:00Added an answer on May 28, 2026 at 1:17 am

    It’s easier to do in this case, because the two parties are independent. If they don’t talk to each other, it’s not hard to create cycles. You have to be mindful to avoid them.

    Cyclic dependencies aren’t hard to create. Look at Java itself: java.lang, java.util, and java.io have cycles. Will you stop writing Java, since it’s so “terrible”?

    It means that you can never use libA without libB and vice versa. They’ve become one big library. Same with packages in Java and other systems: once you have a cycle, you have to use all those packages together as if they were one.

    The guys who write Spring pay a lot of attention to cycles. They design and refactor their framework to eliminate them.

    So – what’s the harm? Juergen Heller says they’re bad, and he’s right. But from your point of view, what evil is visited upon you? It means you have to use both when you run and test. You can’t test class A without class B and vice versa when there’s a cycle between them. It makes testing and running harder.

    You can choose an alternative that doesn’t have the cycle. If you can change the source, you can refactor and maintain it. But that’s it.

    You should check your own code to see if you’ve done it to yourself. IntelliJ has nice analysis tools which can be applied to a code base. Check it out.

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

Sidebar

Related Questions

I'm working with legacy Java code which returns java.lang.object. I'm passing it into a
We are working with some legacy code that accesses a shared drive by the
I am working with a legacy ASP Classic solution which is load balanced (via
I'm working on legacy code that looks very similar to this: public class BaseParser
I'm working on legacy code that builds an index of popular terms in another
We are a team working on legacy code which is pretty old and written
I am working with legacy code written in PHP 5.2.6 with Zend Framework 1.5.3
I'm working a legacy VC++6 app that is trying to add in unicode support,
Apologies if the following sounds a little strange. Am working in a legacy framework
We developing web services with Axis2 framework (legacy system). With jdbc it working fine,

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.