/**
* Returns the currently logged in Sone.
*
- * @param toadletContenxt
+ * @param toadletContext
* The toadlet context
* @return The currently logged in Sone, or {@code null} if no Sone is
* currently logged in
*/
- protected Sone getCurrentSone(ToadletContext toadletContenxt) {
- Session session = getCurrentSession(toadletContenxt);
+ protected Sone getCurrentSone(ToadletContext toadletContext) {
+ Session session = getCurrentSession(toadletContext);
if (session == null) {
return null;
}
String soneId = (String) session.getAttribute("Sone.CurrentSone");
+ if (soneId == null) {
+ return null;
+ }
for (Sone sone : webInterface.core().getSones()) {
if (sone.getId().equals(soneId)) {
return sone;