Skip to content
Snippets Groups Projects
Commit d8f409fa authored by gmantele's avatar gmantele
Browse files

[TAP] Fix NullPointerException in TAPConfiguration (this error happens only...

[TAP] Fix NullPointerException in TAPConfiguration (this error happens only when a NoSuchMethodException occurs.
parent 10db51ea
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,7 @@ import tap.backup.DefaultTAPBackupManager; ...@@ -36,7 +36,7 @@ import tap.backup.DefaultTAPBackupManager;
* and it must be used only thanks to its static classes and attributes.</i></p> * and it must be used only thanks to its static classes and attributes.</i></p>
* *
* @author Gr&eacute;gory Mantelet (ARI) * @author Gr&eacute;gory Mantelet (ARI)
* @version 2.0 (04/2015) * @version 2.1 (06/2015)
* @since 2.0 * @since 2.0
*/ */
public final class TAPConfiguration { public final class TAPConfiguration {
...@@ -416,12 +416,14 @@ public final class TAPConfiguration { ...@@ -416,12 +416,14 @@ public final class TAPConfiguration {
}catch(NoSuchMethodException e){ }catch(NoSuchMethodException e){
// List parameters' type: // List parameters' type:
StringBuffer pTypesStr = new StringBuffer(); StringBuffer pTypesStr = new StringBuffer();
for(int i = 0; i < pTypes.length; i++){ if (pTypes != null){
if (pTypesStr.length() > 0) for(int i = 0; i < pTypes.length; i++){
pTypesStr.append(", "); if (pTypesStr.length() > 0)
if (pTypes[i] == null) pTypesStr.append(", ");
pTypesStr.append("NULL"); if (pTypes[i] == null)
pTypesStr.append(pTypes[i].getName()); pTypesStr.append("NULL");
pTypesStr.append(pTypes[i].getName());
}
} }
// Throw the error: // Throw the error:
throw new TAPException("Missing constructor " + classObj.getName() + "(" + pTypesStr.toString() + ")! See the value \"" + propValue + "\" of the property \"" + propName + "\"."); throw new TAPException("Missing constructor " + classObj.getName() + "(" + pTypesStr.toString() + ")! See the value \"" + propValue + "\" of the property \"" + propName + "\".");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment