Author: adietish
Date: 2010-08-19 08:07:52 -0400 (Thu, 19 Aug 2010)
New Revision: 24296
Modified:
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpGetMethod.java
Log:
[JBIDE-6376] packages refactored, strings externalized
Modified:
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpGetMethod.java
===================================================================
---
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpGetMethod.java 2010-08-19
12:05:44 UTC (rev 24295)
+++
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/HttpGetMethod.java 2010-08-19
12:07:52 UTC (rev 24296)
@@ -48,10 +48,10 @@
HttpURLConnection urlConnection = createURLConnection(urlString, userAgent);
urlConnection.connect();
int responseCode = getResponseCode(urlConnection);
- if (responseCode != HttpURLConnection.HTTP_OK) {
- loggingAdapter.logMessage(MessageFormat.format(UsageMessages.HttpGetMethod_Error_Http,
urlString, responseCode));
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ loggingAdapter.logMessage(MessageFormat.format(UsageMessages.HttpGetMethod_Success,
urlString, responseCode));
} else {
- loggingAdapter.logError(MessageFormat.format(UsageMessages.HttpGetMethod_Success,
urlString));
+ loggingAdapter.logError(MessageFormat.format(UsageMessages.HttpGetMethod_Error_Http,
urlString));
}
} catch (Exception e) {
loggingAdapter.logMessage(MessageFormat.format(UsageMessages.HttpGetMethod_Error_Io,
urlString, e.toString()));
Show replies by date