diff --git a/src/main/java/uk/ac/cam/cl/dtg/isaac/api/GameboardsFacade.java b/src/main/java/uk/ac/cam/cl/dtg/isaac/api/GameboardsFacade.java index e49342961e..49d4f5770f 100644 --- a/src/main/java/uk/ac/cam/cl/dtg/isaac/api/GameboardsFacade.java +++ b/src/main/java/uk/ac/cam/cl/dtg/isaac/api/GameboardsFacade.java @@ -437,13 +437,6 @@ public final Response renameAndSaveGameboard(@Context final HttpServletRequest r @Produces(MediaType.APPLICATION_JSON) @GZIP @Operation(summary = "List all gameboards linked to the current user.") - private String sanitiseForLog(final String input) { - if (input == null) { - return "null"; - } - return input.replace('\r', '_').replace('\n', '_'); - } - public final Response getGameboardsByCurrentUser(@Context final HttpServletRequest request, @QueryParam("start_index") final String startIndex, @QueryParam("limit") final String limit, @@ -565,6 +558,13 @@ public final Response getGameboardsByCurrentUser(@Context final HttpServletReque return Response.ok(gameboards).cacheControl(getCacheControl(NEVER_CACHE_WITHOUT_ETAG_CHECK, false)).build(); } + private String sanitiseForLog(final String input) { + if (input == null) { + return "null"; + } + return input.replace('\r', '_').replace('\n', '_'); + } + /** * REST end point to allow gameboards to be persisted into permanent storage and for it to be added to the users' my * boards collection. diff --git a/src/main/java/uk/ac/cam/cl/dtg/segue/etl/ContentIndexer.java b/src/main/java/uk/ac/cam/cl/dtg/segue/etl/ContentIndexer.java index 10763fb980..46bf762550 100644 --- a/src/main/java/uk/ac/cam/cl/dtg/segue/etl/ContentIndexer.java +++ b/src/main/java/uk/ac/cam/cl/dtg/segue/etl/ContentIndexer.java @@ -380,10 +380,10 @@ private void validateAndCacheContent(final Content flattenedContent, final Conte } log.info(CONTENT_LOG_PREFIX + "Resource with duplicate ID ({}) detected in cache. Skipping {}", - parentContent.getId(), treeWalkPath); + flattenedContent.getId(), treeWalkPath); this.registerContentProblem(flattenedContent, String.format( "Index failure - Duplicate ID (%s) found in files (%s) and (%s): only one will be available.", - parentContent.getId(), + flattenedContent.getId(), treeWalkPath, context.contentCache.get(flattenedContent.getId()).getCanonicalSourceFile()), context.indexProblemCache); @@ -448,8 +448,8 @@ private Content augmentChildContent(final Content content, final String canonica } augmentMediaFieldsViaReflection(content, canonicalSourceFile); - augmentMediaContent(content, canonicalSourceFile, parentId); updateContentIdentifier(content, newParentId, parentPublished); + augmentMediaContent(content, canonicalSourceFile, parentId); return content; }