Throwable.printStackTraceAsCause should be protected instead of private

Hello java gods!
I've no idea, whether this is the right forum to post my request to, but I hope, some sun java developers will read it and may be able to do the following change:
class Throwable, method void printStackTraceAsCause(PrintStream s, StackTraceElement[] causedTrace)
and
class Throwable, method void printStackTraceAsCause(PrintWriter s, StackTraceElement[] causedTrace)
are both declared private. This should be protected, because we are developing a client server environment where exceptions are transferred over the network and for several reasons, I use a special own StackTraceElement. This is necessary, because the original StackTraceElements are created "magically" by the VM and cannot be constructed by normal code. Additionally, I need more information and have added fields to my own RemoteStackTraceElement.
Well, if the above methods were protected instead of private, it would always execute my methods instead of the original ones, if one of my Exceptions is in the list of causes. This means, I could encapsulate my exception the following way, which is sometimes needed, e.g. in Listeners:
void methodGivenByInterface()
throws ExceptionGivenByInterface
try {
client.execCmd(...);
} catch (RemoteException x) {
throw new ExceptionGivenByInterface(x);
If the method that executes myMethod does a printStackTrace, it executes the one of ExceptionGivenByInterface. Because my RemoteException is the cause, the printStackTraceAsCause of it will be executed. But because it is declared private in Throwable, it does not execute my own printStackTraceAsCause but the one of Throwable.
I hope, I could make clear, why it is necessary to change private to protected, and I hope, someone finds the time to change this one word at both methods ;-)
Thousand thanks in advance for getting a protected Throwable.printStackTraceAsCause in j2sdk1.5x!
Best regards, Marco ;-)

Hello java gods!Boom! [thunder sound] Thou darest approach me? ;-)
I hope, I could make clear, why it is necessary to
change private to protected, and I hope, someone finds
the time to change this one word at both methods ;-)Nope, I don't understand why changing this method to protected would help you.
As I understand it, you are simply chaining exceptions, wrapping a remote exception inside another to pass back to the client. You can do this with any exception by using setRootCause() method or the RuntimeException(String, Throwable) constructor.
Thousand thanks in advance for getting a protected
Throwable.printStackTraceAsCause in j2sdk1.5x!Um, whatever.

Similar Messages

  • TreeItem - leaf property wrappers (and others) are private. Should be protected?

    I was creating a TreeItem subclass. Instead of overriding isLeaf and other methods, I simply wanted to use binding so that when the "value" changed, I could set the leaf property, or just bind to the leaf so that the value is updated when my domain object's value changes. However I noticed that both setLeaf and the leaf property wrapper are both private. This forces me to override isLeaf. All I wanted to do was setup some binding expressions or at least a change notifier when the value changes and set the leaf value according. The leaf property is a wrapper and the documentation suggests that a wrapper property was created to help support this scenario directly.  Since my isLeaf computation takes awhile, I have to setup several lines of code to cache the value whereas binding allows me to simplify my code and set it when the value changes, etc.
    Should these properties and the set* companion methods be protected instead to support subclassing using the new property system in javafx?
    Otherwise, there is no easy way to inform the UI that the "leaf" property has changed. Overriding isLeaf does not do that.
    jdk8 ea

    This sounds like a good tweak request to file in the Jira issue tracker here: http://javafx-jira.kenai.com
    Thanks!
    -- Jonathan

  • Due to virus attack i had to format my windows laptop...now when i installed new itunes software i had to sync my ipod touch again but it says that if do the same then the data on my ipod touch will be erased....how should i protect my ipod touch data?

    due to the virus attack i had to format my windows laptop...now when i installed new itunes software i had to sync my ipod touch again but it says that if i do it then the data present on my ipod touch will be erased as it is syncd to some older library... how should i protect my ipod touch data?

    With all you media (apps, music) in the iTunes library connect the iPod to the computer and make a backup. Do that by right clicking on the iPod under Devices in iTunes and select Back Up. Then restore the iPod from that backup.
    Note the the iPod backup that iTunes makes does not included synced media like apps and music.

  • Does Mackeeper cause problems?  What should I use instead?

    I have been using Mackeeper since getting my new Macbook Pro laptop in December 2013/Jan. 2014 (OS X 10.9.4).  I just now read it is not advised to use Mackeeper to 'clean' your computer, and I have since deleted it.  Have I caused my computer problems by using it since I purchased it in December 2013/January 2014?  What, if anything, should I use instead to help keep the system running smoothly, fast, and without issues?  (i.e. malware, viruses, trojans, etc.)
    This is my third Mac laptop and I've always used some type of Mackeeper cleaner; I'm somewhat lost as to what I should now do -- or if I caused my system problems. 
    Thanks in advance.

    What, if anything, should I use instead to help keep the system running smoothly, fast, and without issues?  (i.e. malware, viruses, trojans, etc.)
    No so-called "cleaning" programs are necessary or beneficial.
    All are capable of causing system corruption that, at an extreme, may require completely erasing your Mac and reconfiguring it from the ground up.
    Keep your Mac's operating system up to date with software updates from Apple.
    -- or if I caused my system problems.
    That is possible. If your Mac is not performing as you think it should, describe what you're observing that is causing you concern. Please be as specific as possible - for example, is it taking a long time to launch programs? Is Safari loading web pages slowly, or not at all?
    Whatever you do, if you believe something is wrong with your Mac, never install any product that claims to "clean up", "speed up",  "optimize", "boost" or "accelerate" it; to "wash" it, "tune" it, or to make it "shiny". Those claims are absurd.
    There are many such products and they're all scams designed for one and only one purpose - to take your money. They are very successful at that task. Once that is accomplished, their mission is complete. If your Mac subsequently behaves poorly, if your data becomes irretrievably lost, or if you just waste your time - is completely irrelevant to their true purpose.
    Describe what's wrong and the experienced users on this site will help you fix it.

  • Does Database initializer obsolete in EF 6.0 ? And we should use Migration instead of it.

    In this tutorial
    http://www.asp.net/mvc/overview/older-versions/getting-started-with-aspnet-mvc3/cs/adding-a-new-field
    I see such code
    public class MovieInitializer : DropCreateDatabaseIfModelChanges<MovieDBContext> {
    protected override void Seed(MovieDBContext context) {
    var movies = new List<Movie> {
    new Movie { Title = "When Harry Met Sally",
    ReleaseDate=DateTime.Parse("1989-1-11"),
    Genre="Romantic Comedy",
    Rating="R",
    Price=7.99M},
    new Movie { Title = "Ghostbusters ",
    ReleaseDate=DateTime.Parse("1984-3-13"),
    Genre="Comedy",
    Rating="R",
    Price=8.99M},
    new Movie { Title = "Ghostbusters 2",
    ReleaseDate=DateTime.Parse("1986-2-23"),
    Genre="Comedy",
    Rating="R",
    Price=9.99M},
    new Movie { Title = "Rio Bravo",
    ReleaseDate=DateTime.Parse("1959-4-15"),
    Genre="Western",
    Rating="R",
    Price=3.99M},
    movies.ForEach(d => context.Movies.Add(d));
    But when I went to https://msdn.microsoft.com/en-us/data/ee712907 I see only migration database
    I am newbie at EF. I am focusing on Code First. I have an idea that
    DropCreateDatabaseIfModelChanges
    and another DataBase initializer is not acutal for EF 6 but it was used in previous version.
    On the other hand from names of this
    Database initializer is for database initization
    Migration for database structure changing
    Before learning I decided ask this question
    Does Database initializer obsolete in EF 6.0  ? And I should use Database Migration instead of it ?
    My .NET Blog with projects and feedback.
    Since May 30, 2014 I am waiting for Microsoft fix
    these 2 bug. If you know how to speed them up, please help

    Hello,
    >>Does Database initializer obsolete in EF 6.0?
    I do not know why you think so, if the team decides to make the database initializer obsolete, I think they would make a markup as Deprecated, however, there is not such a markup on that method on MSDN document. And the Database initializer method is useful
    when we play with automatic migration. In your case, the DropCreateDatabaseIfModelChanges database initialization strategy, would delete the original database and create new one according your new model. Of course, data would be missing. If you are under a
    scenario need to make a test to recreate the database frequently, this one should be ok.
    Currently, there are four database initialization strategies could be used:
    CreateDatabaseIfNotExists<TContext> Class
    DropCreateDatabaseAlways<TContext>
    DropCreateDatabaseIfModelChanges<TContext>
    MigrateDatabaseToLatestVersion<TContext, TMigrationsConfiguration>
    You could use one of them for a proper scenario.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Reg.Stock account should  be posted instead of consumption account

    Dear Friends
    Kindly consider our scenario...
    In our production and development system..When create Purchase order with account assignment category E the material account goes to Stock account instead of consumption account like that
    the implementation team has configured. But now I am doing ECC 6 configuration in which I want to configure like the same that is material should go to stock account when I put E. Pls help me.
    Thanks in advance
    Rajakumar.K

    check OBYC settings for any changes occured while assigning

  • Should my team use their private apple id:s or should we create new ones?

    We have some problems regarding our apple id:s since we use our private accounts in the company.
    Should we create new apple id:s just for the company? Whats the benefits? Problems?
    How do we do to manage buying apps, music, use Spotify etc?

    can I use the same email address for multiple Apple ID's?
    My two kids dont need e-mail addresses

  • How should I protect my MBP?

    I am thinking of getting a Speck SeeThru Transparent hardshell case because I want to protect my MB from scractes and at the same time, I can still see the aluminium skin of my MB.
    But I have read a lot of reviews that it is just better to use a sleeve case for MB since the speck hardshell case add on weight and makes it more bulky.
    So if I were to buy a sleeve case for my MB, does a protector film on the macbook cover is even neccessary?
    And should I get a trackpad protector film?

    Personal Choice !
    I use Black Satin
    https://www.speckproducts.com/macbook-cases/macbook-pro-seethru-satin.html
    The Apple logo shines through, it looks smart in my opinion.
    http://www.google.co.uk/imgres?q=Black+Satin+apple+logo+speck&hl=en&sa=X&biw=129 7&bih=692&tbm=isch&prmd=imvns&tbnid=QuitjStXE93W7M:&imgrefurl=http://www.geekinh eels.com/2012/01/24/cool-tool-tuesdays-what-i-use-to-clean-and-protect-my-macboo k-pro.html&docid=33nHdnIIcBUbEM&imgurl=http://www.geekinheels.com/wp-content/upl oads/2012/01/speck_product_seethru_satin_case_apple_logo.jpeg&w=400&h=318&ei=tRi AT_6ZKqWr0QXSk_mWBw&zoom=1&iact=hc&vpx=407&vpy=154&dur=166&hovh=200&hovw=252&tx= 63&ty=147&sig=103331582394836820815&page=1&tbnh=150&tbnw=202&start=0&ndsp=15&ved =1t:429,r:1,s:0,i:69

  • How should I protect my code?

    Hi,
    To start with I'd like to apologize if I've posted this question in the wrong forum. I wasn't quite sure where to post it.
    Ok, here goes. I've gotten a contract to design a database connected website for a government organization. One of the conditions of the contract is that I have to provide them with 'access' to the source code for the system I write. I haven't done a licensing agreement for the project yet, but they've already been made aware that they will receive a license and will not be allowed to use any of the source code for purposes other than expanding their system. This is fine with them. Now here's where I'm at a loss of what to do...
    I know there will be future contracts awarded to continue the development of this system. However, the future contracts will be for more money and will involve less work than the orignal contract I'm doing (it's the government and they really have no comprehension of what's involved). So, I basically want to fulfill my legal obligation of providing source code, but I want to make it as difficult as possible for someone to build into the system I write. Here's what I've come up with so far.
    1. Try to get a licensing agreement that forces them to obtain written permission before modifying any source code for future development (which will be necessary).
    2. I've seen programs that will make code very unreadable after it's been decompiled. Is there anything that will do a similar thing to source code? For example, remove all comments and rename all the variables to something like 'an5the32'.
    I know this sounds kind of greedy, but the scope of this project is considerably larger than I realized (was led to believe) and without landing one of the future contracts I'm getting ripped off, so I really have no reservations about making things difficult for them. Any suggestions would be appreciated.

    Have you seen this site?
    http://mindprod.com/unmainobfuscation.html
    In all seriousness, there are several source code
    obfuscation tools available, Just use Google and
    search for "source obfuscator Java" or like.
    Some of the products I found but never tested are:
    http://www.semdesigns.com/Products/Formatters/Obfuscators.html
    http://www.jdevelop.com/java-source-obfuscator.html
    For byte code obfuscators to protect the binary from being decompiled, the links in
    http://mindprod.com/jglossobfuscator.html
    I found to be quite comprehensive..
    BTW Out of all of them in the list,
    I have evaluated Dash-O and Sourceguard.
    I chose sourceguard but 4thpass chose to
    abandon the product with no notice, soon
    after we had bought it...
    Software companies doing that kind of
    thing should not last long, but anyways,
    Good luck, and happy obfuscating!
    Steve Tsang
    [email protected]

  • A tab popped up wich said Mozzilla Security, the web page seemed to scan my computer, stated it was infested with several viruses, and that I should download protection immediatly. Is this legit?

    A new tab opened up on my tool bar labeled Mozilla Security. The website looks like your security warning. But the security button is gray, McAfee doesn't recognize the site, and the web address does not contain Mozilla.com. The web address of this pop up page is: http://update89.modyett.co.be/index.php?Q57hGtS5bW5G7Hr+M0lEZy4rE7T40TcfocDyRAcjpCPVLS/PhAEpv1Hgq9vgx1qxsLunLyiXHnwwL5T3qX/CE0Q/ZRXJp+2mKYsC+kRq
    Do I have a virus, as it states, or is this uninvited web page trying to install a virus? What should I do?

    Just because it said Mozilla Security in the title bar does not mean it is from Mozilla as Mozilla nor the Firefox browser has ever done such a thing.
    This sounds like one of those fake animated scanners which claims it is scanning your computer and then says you are infected with such and such. It then suggests to download something that will be what really infects your computer if using Windows. As long as you did not download and install this whatever.exe then you should be safe. Though you may want to scan your computer with whatever antivirus software you have with updated definitions just to be safer.
    This sort of thing is even more obvious on being fake when Linux and Mac users can encounter these pages.

  • What should I use instead Front row?

    Hello,
    I have discovered that Lion does not have Front Row. What are you using instead if front row?
    Thanx,
    c

    Thankx for answear,
    just installed Front Row on Lion

  • How should i protect accept() method from TooManyOpenFiles?

    I am calling accept() method assuming it will always work, considering it might result in NULL, but i've noticed in some situations the accept will fail and result in a CPU problem because it fails and since i did not do anything with the failure the key might still be valid and it tries to accept over and over again.
    What is the right thing to do here - should i surround with try-catch and it will not attempt to accept the connection again?
            SocketChannel channel = ((ServerSocketChannel) key.channel()).accept();
            if (channel != null)
                if (!isApprovedClient(channel))
                    channel.close();
                    channel = null;
                    rejectedClients++;
                    return;
                acceptedClients++;
                channel.configureBlocking(false);
                BasicContext context = onClientAccept(channel);
                context.setCurrentSocket(channel);
                context.setEstablishTime();
                channel.register(selector, SelectionKey.OP_READ, context);
                log.log(Level.FINER, "Added main-channel {0}", channel.socket().getInetAddress());
            }

    I am calling accept() method assuming it will always work, considering it might result in NULL, but i've noticed in some situations the accept will failFail how?
    and result in a CPU problemWhat CPU problem?
    because it fails and since i did not do anything with the failure the key might still be validWhat key? The key of the ServerSocketChannel? It is valid until you close or deregister it. Nothing to do with accept failures.
    and it tries to accept over and over again.If the accept fails there is no SocketChannel to leak/to be closed.

  • Should I protect my iMac with anti virus software and if yes what do you recommend thanks

    should i prtect i mac with anti virus software?

    If desired, use ClamXav. Any Mac OS X antivirus software which people actually charge for, as opposed to free downloads, should be avoided.
    (70900)

  • In Photoshop Elements 11 attempting to blend two photos ( layering one on another) when I click on a brush, I get a smart brush which doesn't do what the instruction say it should do. Instead I can get the eraser to do what I need to do. Why the confusion

    In Photoshop Elements 11 attempting to blend two photos (layering one on another) I click on brush and get a smart brush which doesn't do what the instructions say it will do. I can get the eraser to do what I want. Why the confusion???

    I click on brush and get a smart brush which doesn't do what the instructions say it will do.
    The Brush tool (Keyboard B) has several different brushes in the same slot. Right click on the brush icon and you will see them, or press B sequentially.
    The Smart Brush tool (Keyboard F) has two items in the slot.
    Since you did not provide reference to "the instructions", it is difficult to remedy the "confusion." that exists.
    I suspect that the recipe calls for a mask, and painting with a black brush to mask out certain areas.
    It would help if you post the instructions and what your goal is with more specificity.

  • Why we should use JSP instead of Servlet ?

    I want to know what are the advantages to use JSP over Servlet.

    hi
    Servlets are server exctension ( like CGI ) separate executable
    modules to serve any request efficiently.
    Servlets are pure java classes, u can use them the write an html code to browser.
    u have to compile the servlet before u use it.
    JSP page, is a text-base document , u can type html inside it , and u can use java as scripting language, so it is more easy to use jsp rather than servlet as each jsp page is translated into a servlet by JSP engine.
    Hope this will help
    Good luck
    Mohammed

Maybe you are looking for

  • SAP Web Service error text : The database returned a value containing an error , type  CX_SY_OPEN_SQL_DB

    Hello Guru's, we are creating sales order in SAP from a quote created in .NET,  through Web Service created in SAP, and consumed in .NET. When ever a order is created in SAP for a given quote, SAP returns the sales order number to .NET. Orders are ge

  • Set the default border color for text fields?

    My InfoPath 2010 text field borders are defaulting to white for some reason (which basically means invisible on a white form).  Do y'all know if there's a way to set this somewhere?  Drop-downs (for example) are still showing up as the light-grey.  M

  • Use of JAAS in WLS6 for sngle logon

    We're in the design stage of a product, which will be based on Weblogic Server 6 and are hoping to use JAAS. I'm quite new to WL in general and JAAS security and having read the documentation, I'm still not clear on a few points about how JAAS is use

  • HOWTO: Add a UNIQUE constraint to a populated column

    Here is the way to add a unique constraint to a populated column, ensuring that the existing values are unique as well. ALTER TABLE t1 ADD CONSTRAINT t1_uk UNIQUE (col1,col2) EXCEPTIONS INTO my_exceptions /If the alter table statement fails this will

  • Photoshop/Premiere Elements 11 Freeze When Getting Media

    Hello Everyone, Whenever I start Elements Organiser, there is an on-screen message that there are files ready to import and that the Organiser will now import these files into the Catalog. Then a "Getting Media" box displays and, at some point, say 5