Forums Register Login

Undefined label causing compile error

+Pie Number of slices to send: Send
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;
}
+Pie Number of slices to send: Send
Ah the compiler error is pretty obvious. You have "break MISSING_..." where MISSING... should be a label. Consider this:



Now OUTER is a label for the loop. According to your code there is no "MISSING..." anyway other than the break line.
+Pie Number of slices to send: Send
 

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!



Decompilers don't always generate valid java code. If it runs into issues, it will generate code as best effort. You may even call it pseudo code.

Henry
+Pie Number of slices to send: Send
Sorry for what probably seem like silly questions.

Are you saying that I have to put all this code into a for loop and within that for loop, add another for loop?
+Pie Number of slices to send: Send
It's not a silly question.

By the way: There was another thread about labelled break and decompiled code here a few days ago.
+Pie Number of slices to send: Send
I was actually able to remove the break altogether. I then ran into some problems with missing try/catch blocks but I was able to work through them.

Thanks again,
Charisse
+Pie Number of slices to send: Send
Well done
If you send is by car it's a shipment, but if by ship it's cargo. This tiny ad told me:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 8408 times.
Similar Threads
SQL Server 2000 JDBC Driver Error
method not found in imported class - JCAPS6
Page section does not update after call of a4j:support in IE 9
Proxy Server Using JSP
SQL Server : Exception when taking connection second time, with out closing first
HttpURLConnection woes!
Automated HTTP Session
POST Request Java
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:41:26.