diff --git a/modules/minigl/src/main/java/org/jpos/gl/GLEntry.java b/modules/minigl/src/main/java/org/jpos/gl/GLEntry.java index c0de8c9a66..0974ebe0fa 100644 --- a/modules/minigl/src/main/java/org/jpos/gl/GLEntry.java +++ b/modules/minigl/src/main/java/org/jpos/gl/GLEntry.java @@ -264,9 +264,14 @@ public Element toXML (boolean deep) { * @return this */ public GLEntry addTag (String tag) { - getTags().add(tag); + if (tags == null) + tags = new Tags(); + tags.add(tag); return this; } + public boolean hasTag (String tag) { + return tags != null && tags.contains(tag); + } public boolean equals(Object other) { if ( !(other instanceof GLEntry) ) return false; GLEntry castOther = (GLEntry) other;