ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1371121 - /ace/sandbox/marrs/org.apache.ace.client.repository.impl/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java
Date Thu, 09 Aug 2012 09:31:41 GMT
Author: marrs
Date: Thu Aug  9 09:31:41 2012
New Revision: 1371121

URL: http://svn.apache.org/viewvc?rev=1371121&view=rev
Log:
Added extra logging in case an artifact either has no resource processor PID or no resource
processor for that PID can be found at runtime.

Modified:
    ace/sandbox/marrs/org.apache.ace.client.repository.impl/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java

Modified: ace/sandbox/marrs/org.apache.ace.client.repository.impl/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.client.repository.impl/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java?rev=1371121&r1=1371120&r2=1371121&view=diff
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.client.repository.impl/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java
(original)
+++ ace/sandbox/marrs/org.apache.ace.client.repository.impl/src/org/apache/ace/client/repository/stateful/impl/StatefulTargetRepositoryImpl.java
Thu Aug  9 09:31:41 2012
@@ -622,9 +622,15 @@ public class StatefulTargetRepositoryImp
                     for (ArtifactObject artifact : feature.getArtifacts()) {
                         result.add(artifact);
                         if (!m_bundleHelper.canUse(artifact)) {
-                            ArtifactObject processor = allProcessors.get(artifact.getProcessorPID());
+                            String processorPID = artifact.getProcessorPID();
+                            if (processorPID == null) {
+                                m_log.log(LogService.LOG_ERROR, "No processor PID found for
" + artifact.getName());
+                                return null;
+                            }
+                            ArtifactObject processor = allProcessors.get(processorPID);
                             if (processor == null) {
                                 // this means we cannot create a useful version; return null.
+                                m_log.log(LogService.LOG_ERROR, "No processor found for "
+ artifact.getName() + " with processor PID " + processorPID);
                                 return null;
                             }
                             result.add(processor);



Mime
View raw message