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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:18:28+00:00 2026-06-12T15:18:28+00:00

Not sure if this is the right spot to ask but I’m having a

  • 0

Not sure if this is the right spot to ask but I’m having a Java issue. I have some Java code that works in Java 6 but not in Java 7, the error is:

java.lang.IllegalStateException: This function should be called while holding treeLock

Using Java6 works but a few of our external users are running Java 7. I figured out the error was caused by a call to validateTree(), which works in java6 but in Java7 we need to call validate() . When I test it locally it works.

Here’s my problem, I started working at a big corporate and they won’t let us make any changes to the code until its been very throughly looked at(my working change is going to take affect in April 2013) but until then our users are getting annoyed. I’m not the best with Java and was wondering if there was a way I could pass a runtime parameters to have this changed? or is there anything I can do without touching the code base?

I’m embrassed to ask this question since it could be solved easily by just implementing the fix but any ideas or direction would be very helpful.

Update: I’m ideally looking for something that I can get support to put in the java runtime parameter that would change all validateTree() references to validate().

  • 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-12T15:18:29+00:00Added an answer on June 12, 2026 at 3:18 pm

    Can I use runtime parameters to fix out of bad API calls in Java?

    As a general rule, no.

    In a specific case, you could look at the source code of the relevant classes Java 7 version of the class library to see if there is a backwards compatibility property.


    Assuming that you can’t find a fix, you are kind of stuck. I’d suggest:

    • Recommend to your customers that they use Java 6 until a fix can be issued.
    • Discuss with your management whether they can make an exception to their policy to allow this problem to be fixed urgently.

    If neither of those works, then the real problem is between your customers and your management. You’ve done as much as you can do. Leave it to “the higher ups” deal with it.


    You might be interested in my Answer to a related SO Question which touches on the issue of why they made this “breaking” change. My take is that the change is to force people to fix a class of insidious, hard-to-reproduce application bugs that cause strange UI behaviour. And that is a good thing … in the long term.

    Based on that, you could make a stronger case for issuing an out-of-band fix. The fix to replace validateTree() calls with validate() calls is actually a necessary fix for all Java platforms, not just for Java 7.

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

Sidebar

Related Questions

Im not sure if I'm doing this right. I have an action that I
I'm not sure this is the right place to ask the question but I
I'm not sure this is the right place but here I go: I have
Not sure I heard this right, but VS2010 no longer has support for Wix?
Not sure if this is the right forum for me to ask this question.
Hi not sure if this is the right forum for this but does anyone
I'm not sure if this is the right place to post this question but
I'm not sure if this is the right place for this question, but here
I am not sure if this will be right place to ask the question,
this is pseudo code var index_of_myid = $('.selection').indexOf($('#myid)); not sure if this is right

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.