Solved

Undefined Label causing compile error

Posted on 2009-04-09
4
459 Views
Last Modified: 2013-11-23
I am receiving the following compile error on code that was previously compiled.   All I did was decompile it can attempt to recompile.  I haven't touched this code.  I am tried several ways to define this label but I'm having no luck.  Please help!


    [javac] C:\projects\MyCSP_CMS\Code\src\com\vignette\tas\util\RemoteDataHandl
er.java:206: undefined label: MISSING_BLOCK_LABEL_338
    [javac]         break MISSING_BLOCK_LABEL_338;



Here is the code that is causing the error.  It is the   break MISSING_BLOCK_LABEL_338; line.   I don't know what to do.





public void getRemoteData(HttpServletRequest request, HttpServletResponse response)
    {
        String urlString;
        String queryString;
        String userName;
        UserNameCallback userNameCallback;
        Locale locale;
        URLConnection connection;
        urlString = null;
        queryString = request.getQueryString();
        userName = null;
        userNameCallback = null;
        locale = null;
        connection = null;
        Set cookies;
        URL url;
        try
        {
            userNameCallback = getUserNameCallback();
            locale = userNameCallback.getLocale(request);
            urlString = getRemoteURLString(request, userNameCallback);
            if(!userNameCallback.isProxyRequest(request))
            {
                userNameCallback.doNonProxyActivity(request, response);
                return;
            }
        }
        finally
        {
            try
            {
                if(connection != null)
                    connection.getInputStream().close();
            }
            catch(IOException e) { }
        }
        cookies = null;
        if(userNameCallback.needsAuthentication(request, response))
        {
            userName = userNameCallback.getUserName(request);
            cookies = getAuthenticatedUserData(request, response, userName);
        } else
        {
            cookies = CookieHandler.addCookiesFromBrowser(request);
        }
        url = new URL(urlString);
        LOG.debug("Connecting to remote url " + urlString);
        connection = getConnection(url, request, response, cookies, queryString);
        if(connection == null)
            return;
        if(!userNameCallback.needsAuthentication(request, response))
        {
            cookies = CookieHandler.getCookiesFromRemoteRequest(connection, request);
            setCookieCache(cookies, request, response);
        }
        String loginKeyValue = connection.getHeaderField("x-vgn-vcm-login-page");
        if(loginKeyValue != null && loginKeyValue.equals("true") && userNameCallback.needsAuthentication(request, response))
        {
            LOG.debug("Login screen showed up, re-authenticating");
            cookies = getAuthenticatedUserData(request, response, userName, true);
            connection = getConnection(url, request, response, cookies, queryString);
            if(connection == null)
                return;
        }
        try
        {
            postRemoteData(connection, response);
        }
        catch(Throwable e)
        {
            handleCMAError(e, response, locale);
        }
        break MISSING_BLOCK_LABEL_338;
    }

Open in new window

0
Comment
Question by:cmlane08
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
Kuldeepchaturvedi earned 250 total points
ID: 24107323
I think that MISSING BLOCK text has come from your decompiler and is not the part of original code..

looks like your decompiler failed to decompile this block of code and hence placed this text..
I could be wrong on that though.
0
 

Author Comment

by:cmlane08
ID: 24107772
I think you're right.   I removed the break altogether because there was no loop.   I then received errors because some exceptions weren't properly caught in a try/catch block.   I added them and now I'm able to compile!

Thanks so much for your help.   I will accept this as the Solution.
0
 

Author Closing Comment

by:cmlane08
ID: 31568483
thanks so much for your help!
0
 
LVL 3

Expert Comment

by:avdej
ID: 24107896
Just delete the line with THIS break statement.
From the decompiler's point of view it simply marks the end of that particular method (i.e labeled block) and attempts to return a thread of execution to the caller.

Avdej

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
split string containing \r\n in Java 46 43
couple of eclipse 5 35
Way to decrease size of apk file 9 65
Opening PDF on button click and fill new document 2 35
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now