MetaData meta = getMeta();
meta.setType(getType().toString());
meta.setSource(getType().getSourceName());
- meta.setPublisher(getType().getSourceName());
-
+ if (meta.getPublisher() == null) {
+ meta.setPublisher(getType().getSourceName());
+ }
+
if (meta.getCreationDate() == null
|| meta.getCreationDate().trim().isEmpty()) {
meta.setCreationDate(bsHelper
Scanner scan = new Scanner(in);
scan.useDelimiter("\0");
try {
+ if(!scan.hasNext())
+ throw new IOException("The given input was empty");
+
return new JSONObject(scan.next());
} catch (JSONException e) {
throw new IOException(e);