Commit f9fbb97a by Tuomas Riihimäki

Merge branch 'master' into 'master'

Master

nullpointerfixi

See merge request !190
2 parents 9aaaffd3 07dbede4
......@@ -55,6 +55,8 @@ public class GenericEntity extends EntityEquals implements ModelInterface, Entit
@Override
public JsonObject getMeta() {
// TODO: do not return null, it's not logical
// empty jsonobject would be moar logical (maybe?)
return meta;
}
......
......@@ -273,21 +273,20 @@ public class IncomingView extends GenericCDIView {
*/
public String getCardFiling() {
String ret = "";
// try {
PrintedCard card = cardBean.checkPrintedCard(userview.getSelectedUser());
if (card != null) {
JsonObject cardMeta = card.getMeta();
JsonObject cardFilingObject = cardMeta.getJsonObject("card-filing");
if(cardFilingObject != null) {
ret = cardFilingObject.getString("cardplace");
if(cardMeta != null) {
JsonObject cardFilingObject = cardMeta.getJsonObject("card-filing");
if (cardFilingObject != null) {
ret = cardFilingObject.getString("cardplace");
}
}
}
// Hmm, onkohan tää ihan tarkoituksenmukaista?
// (mergerequestin tekijä vois arvioida)
// } catch (Exception e) {
// logger.warn("Could not get card filing info", e);
// }
return ret;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!