public AboutParams(Manifest manifest) { super(); if (manifest != null) { Attributes attributes = manifest.getMainAttributes(); title = attributes.getValue("Implementation-Title"); source = attributes.getValue("Implementation-Vendor"); custom = getLabel("installation.details"); description = attributes.getValue("Description"); set("name", title); set("version", attributes.getValue("Implementation-Version")); } }
/** * Add first non-null/non-empty value to map. * * @param key The key to be added (is translated to a label value). * @param values The list of possible values. */ private void set(String key, String... values) { String value = get(values); if (value != null) { put(getLabel(key), value); } }