public static String getDefNamespace(Reader in) {
        List<String> defLines = getDefLines(in);
        String declaredPackage = getDirective(defLines, packageDirectivePattern);
        String declaredNamespace = getDirective(defLines, namespaceDirectivePattern);
        return declaredPackage != null ? declaredPackage : declaredNamespace != null ? declaredNamespace : "";
    }
Finds the def package or namespace from a reader for a def-file. Returns "" (empty string)
if no package or namespace was found. If both package and namespace are declared in the def
file, the package is returned.

@param in A reader to a def-file
@return namespace of the def-file, or "" (empty string) if no namespace was found
config/src/main/java/com/yahoo/vespa/config/util/ConfigUtils.java