Ver código fonte

AMBARI-14066. Ambari Server Upgrade from 2.1.2 to 2.1.3.0 fails with NPE. (mpapirkovskyy)

Myroslav Papirkovskyy 9 anos atrás
pai
commit
a147e43c8f

+ 1 - 1
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java

@@ -210,7 +210,7 @@ public class UpgradeEntity {
    * @return possibility to process downgrade
    * @return possibility to process downgrade
    */
    */
   public Boolean isDowngradeAllowed() {
   public Boolean isDowngradeAllowed() {
-    return downgrade_allowed != 0;
+    return downgrade_allowed != null ? (downgrade_allowed != 0) : null;
   }
   }
 
 
   /**
   /**