You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by re...@apache.org on 2012/05/04 15:50:22 UTC
svn commit: r1333963 - in
/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core:
rest/controller/VirtualSchemaController.java util/ConnBundleManager.java
Author: rene
Date: Fri May 4 13:50:22 2012
New Revision: 1333963
URL: http://svn.apache.org/viewvc?rev=1333963&view=rev
Log:
sonar: avoid NPE by calling an object after assessing it is null
Modified:
incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/VirtualSchemaController.java
incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/util/ConnBundleManager.java
Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/VirtualSchemaController.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/VirtualSchemaController.java?rev=1333963&r1=1333962&r2=1333963&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/VirtualSchemaController.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/VirtualSchemaController.java Fri May 4 13:50:22 2012
@@ -129,7 +129,7 @@ public class VirtualSchemaController ext
Class reference = getAttributableUtil(kind).virtualSchemaClass();
AbstractVirSchema virtualSchema = virtualSchemaDAO.find(virtualSchemaTO.getName(), reference);
if (virtualSchema == null) {
- throw new NotFoundException("Virtual schema '" + virtualSchema.getName() + "'");
+ throw new NotFoundException("Virtual schema is null");
}
virtualSchema = virtualSchemaDataBinder.update(virtualSchemaTO, virtualSchema,
Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/util/ConnBundleManager.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/util/ConnBundleManager.java?rev=1333963&r1=1333962&r2=1333963&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/util/ConnBundleManager.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/util/ConnBundleManager.java Fri May 4 13:50:22 2012
@@ -117,7 +117,7 @@ public class ConnBundleManager {
public ConfigurationProperties getConfigurationProperties(final ConnectorInfo info) throws NotFoundException {
if (info == null) {
- throw new NotFoundException("Invalid connector info " + info);
+ throw new NotFoundException("Invalid: connector info is null");
}
// create default configuration