Author: mputz
Date: 2012-01-12 12:31:34 -0500 (Thu, 12 Jan 2012)
New Revision: 8295
Modified:
epp/portal/branches/EPP_5_2_0_GA_JBEPP-1479/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
epp/portal/branches/EPP_5_2_0_GA_JBEPP-1479/component/portal/src/main/java/org/exoplatform/portal/mop/importer/Imported.java
Log:
JBEPP-1479: Backport of GTNPORTAL-2325 fixes to the EPP_5_2_0 codebase to prevent
NullPointerException during startup
Modified:
epp/portal/branches/EPP_5_2_0_GA_JBEPP-1479/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
===================================================================
---
epp/portal/branches/EPP_5_2_0_GA_JBEPP-1479/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2012-01-12
16:14:56 UTC (rev 8294)
+++
epp/portal/branches/EPP_5_2_0_GA_JBEPP-1479/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2012-01-12
17:31:34 UTC (rev 8295)
@@ -222,23 +222,28 @@
{
Imported imported = workspace.adapt(Imported.class);
imported.setCreationDate(new Date());
- session.save();
// for legacy checking
if (dataStorage_.getPortalConfig(defaultPortal) != null)
{
perform = false;
+ imported.setStatus(Status.DONE.status());
}
else
{
isFirstStartup = true;
}
+ session.save();
}
else
{
Imported imported = workspace.adapt(Imported.class);
- Status status = Status.getStatus(imported.getStatus());
- perform = (Status.WANT_REIMPORT == status);
+ Integer st = imported.getStatus();
+ if (st != null)
+ {
+ Status status = Status.getStatus(st);
+ perform = (Status.WANT_REIMPORT == status);
+ }
}
if (overrideExistingData)
Modified:
epp/portal/branches/EPP_5_2_0_GA_JBEPP-1479/component/portal/src/main/java/org/exoplatform/portal/mop/importer/Imported.java
===================================================================
---
epp/portal/branches/EPP_5_2_0_GA_JBEPP-1479/component/portal/src/main/java/org/exoplatform/portal/mop/importer/Imported.java 2012-01-12
16:14:56 UTC (rev 8294)
+++
epp/portal/branches/EPP_5_2_0_GA_JBEPP-1479/component/portal/src/main/java/org/exoplatform/portal/mop/importer/Imported.java 2012-01-12
17:31:34 UTC (rev 8295)
@@ -69,9 +69,9 @@
}
@Property(name = "gtn:status")
- public abstract int getStatus();
+ public abstract Integer getStatus();
- public abstract void setStatus(int status);
+ public abstract void setStatus(Integer status);
@Property(name = "gtn:creationdate")
public abstract Date getCreationDate();
Show replies by date