You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ace.apache.org by ja...@apache.org on 2013/10/14 16:33:38 UTC
svn commit: r1531912 - in
/ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository:
ext/impl/RemoteRepository.java impl/RepositoryFactory.java
Author: jawi
Date: Mon Oct 14 14:33:38 2013
New Revision: 1531912
URL: http://svn.apache.org/r1531912
Log:
Improved error messages by adding the failing URL; removed obsolete annotation.
Modified:
ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/ext/impl/RemoteRepository.java
ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/impl/RepositoryFactory.java
Modified: ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/ext/impl/RemoteRepository.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/ext/impl/RemoteRepository.java?rev=1531912&r1=1531911&r2=1531912&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/ext/impl/RemoteRepository.java (original)
+++ ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/ext/impl/RemoteRepository.java Mon Oct 14 14:33:38 2013
@@ -83,11 +83,11 @@ public class RemoteRepository implements
int rc = connection.getResponseCode();
if (rc == HttpServletResponse.SC_NOT_FOUND) {
connection.disconnect();
- throw new IllegalArgumentException("Requested version not found in remote repository. (" + connection.getResponseMessage() + ")");
+ throw new IllegalArgumentException("Requested version not found in remote repository. (" + connection.getResponseMessage() + ") for " + url.toExternalForm());
}
else if (rc != HttpServletResponse.SC_OK) {
connection.disconnect();
- throw new IOException("Connection error: " + connection.getResponseMessage());
+ throw new IOException("Connection error: " + connection.getResponseMessage() + " for " + url.toExternalForm());
}
return connection.getInputStream();
@@ -130,7 +130,7 @@ public class RemoteRepository implements
try {
String line = reader.readLine();
if (line == null) {
- throw new IOException("Repository not found: customer=" + m_customer + ", name=" + m_name);
+ throw new IOException("Repository not found: customer=" + m_customer + ", name=" + m_name + " for " + url.toExternalForm());
}
String representation = line.substring(line.lastIndexOf(','));
@@ -141,7 +141,7 @@ public class RemoteRepository implements
}
}
- throw new IOException("Connection error: " + connection.getResponseMessage());
+ throw new IOException("Connection error: " + connection.getResponseMessage() + " for " + url.toExternalForm());
}
finally {
connection.disconnect();
Modified: ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/impl/RepositoryFactory.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/impl/RepositoryFactory.java?rev=1531912&r1=1531911&r2=1531912&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/impl/RepositoryFactory.java (original)
+++ ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/impl/RepositoryFactory.java Mon Oct 14 14:33:38 2013
@@ -103,7 +103,6 @@ public class RepositoryFactory implement
* If any of the above explanation fails <b>or</b>when there is an internal error creating the
* repository.
*/
- @SuppressWarnings("unchecked")
public void updated(String pid, Dictionary dict) throws ConfigurationException {
String customer = (String) dict.get(REPOSITORY_CUSTOMER);
if ((customer == null) || "".equals(customer)) {