src/core/se/jbee/inject/Packages.java
private static String parent(String root) {
		return root.substring(0, root.lastIndexOf('.', root.length() - 2)
			+ (root.endsWith(".") ? 1 : 0));
	}
private static String parent(String root) {
		return root.substring(0, root.lastIndexOf('.', root.length() - 2)
			+ (root.endsWith(".") ? 1 : 0));
	}
<pre>
foo.bar.baz -> foo.bar
foo.bar. -> foo.
</pre>