forked from lsmyrnaios/UrlsController
- Code-optimization.
- Upload the updated gradle-wrapper and set using the latest Gradle version in "installAndRun.sh" script.
This commit is contained in:
parent
64a1b7d4f0
commit
0d117743c2
Binary file not shown.
|
@ -26,7 +26,7 @@ if [[ justRun -eq 1 && shouldRunInDocker -eq 1 ]]; then
|
|||
justRun=0
|
||||
fi
|
||||
|
||||
gradleVersion="8.6"
|
||||
gradleVersion="8.7"
|
||||
|
||||
if [[ justRun -eq 0 ]]; then
|
||||
|
||||
|
|
|
@ -110,10 +110,7 @@ public class FileUtils {
|
|||
int numFilesFoundFromPreviousAssignmentsBatches = 0;
|
||||
int numFullTextsWithProblematicLocations = 0;
|
||||
|
||||
HashMultimap<String, Payload> allFileNamesWithPayloads = HashMultimap.create((sizeOfUrlReports / 5), 3); // Holds multiple values for any key, if a fileName(key) has many IDs(values) associated with it.
|
||||
|
||||
HashMultimap<String, Payload> hashesWithPayloads = getHashesWithPayloads(urlReports, sizeOfUrlReports); // Holds multiple payloads for the same fileHash.
|
||||
|
||||
Set<String> fileHashes = hashesWithPayloads.keySet();
|
||||
int fileHashesSetSize = fileHashes.size(); // Get the size of the keysSet, instead of the whole multimap.
|
||||
if ( fileHashesSetSize == 0 ) {
|
||||
|
@ -122,6 +119,7 @@ public class FileUtils {
|
|||
}
|
||||
|
||||
HashMap<String, String> hashLocationMap = getHashLocationMap(fileHashes, fileHashesSetSize, assignmentsBatchCounter, "assignments");
|
||||
HashMultimap<String, Payload> allFileNamesWithPayloads = HashMultimap.create((sizeOfUrlReports / 5), 3); // Holds multiple values for any key, if a fileName(key) has many IDs(values) associated with it.
|
||||
|
||||
for ( String fileHash : fileHashes )
|
||||
{
|
||||
|
|
|
@ -44,9 +44,10 @@ public class GenericUtils {
|
|||
public static String getSelectiveStackTrace(Throwable thr, String initialMessage, int numOfLines)
|
||||
{
|
||||
StackTraceElement[] stels = thr.getStackTrace();
|
||||
StringBuilder sb = new StringBuilder(numOfLines *100);
|
||||
StringBuilder sb = new StringBuilder(numOfLines *100); // This StringBuilder is thread-safe as a local-variable.
|
||||
if ( initialMessage != null )
|
||||
sb.append(initialMessage).append(GenericUtils.endOfLine).append("Stacktrace:").append(GenericUtils.endOfLine); // This StringBuilder is thread-safe as a local-variable.
|
||||
sb.append(initialMessage).append(GenericUtils.endOfLine);
|
||||
sb.append("Stacktrace:").append(GenericUtils.endOfLine);
|
||||
for ( int i = 0; (i < stels.length) && (i <= numOfLines); ++i ) {
|
||||
sb.append(stels[i]);
|
||||
if (i < numOfLines) sb.append(GenericUtils.endOfLine);
|
||||
|
|
Loading…
Reference in New Issue