@Override public DateTime buildDate() { //We have to do this lazily because you can't read the OSGi header while the plugin is being inited. if (buildDate == null) { final Plugin plugin = this.plugin.get(); if (plugin == null) { throw new IllegalStateException("Plugin '" + getPrimaryPlugin().getPluginKey() + "' no longer exists."); } buildDate = new AmpsBuildDateParser().apply(plugin).getOrElse(new DateTime(0)); } return buildDate; }