From bde6d4a2209878adf59deae8d61a9f5f8a4ad60c Mon Sep 17 00:00:00 2001 From: dzu Date: Sun, 12 Dec 2021 01:52:46 +0200 Subject: [PATCH] Minor fix --- CorveToFurrier2/.classpath | 6 +----- CorveToFurrier2/.settings/org.eclipse.jdt.core.prefs | 3 +++ CorveToFurrier2/src/dzuchun/app/ctf/MainWindow.java | 7 ++++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CorveToFurrier2/.classpath b/CorveToFurrier2/.classpath index 4f2c72b..51a8bba 100644 --- a/CorveToFurrier2/.classpath +++ b/CorveToFurrier2/.classpath @@ -1,10 +1,6 @@ - - - - - + diff --git a/CorveToFurrier2/.settings/org.eclipse.jdt.core.prefs b/CorveToFurrier2/.settings/org.eclipse.jdt.core.prefs index ec1937b..0fee6a9 100644 --- a/CorveToFurrier2/.settings/org.eclipse.jdt.core.prefs +++ b/CorveToFurrier2/.settings/org.eclipse.jdt.core.prefs @@ -1,5 +1,6 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.8 @@ -7,6 +8,8 @@ org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 diff --git a/CorveToFurrier2/src/dzuchun/app/ctf/MainWindow.java b/CorveToFurrier2/src/dzuchun/app/ctf/MainWindow.java index 92a14c5..cecb240 100644 --- a/CorveToFurrier2/src/dzuchun/app/ctf/MainWindow.java +++ b/CorveToFurrier2/src/dzuchun/app/ctf/MainWindow.java @@ -214,7 +214,12 @@ public void calculateResult() { fillFreq(); synchronized (LOCK) { circles = FurrierTransforms.setDescrete(freq, curve); - List order = new ArrayList<>(List.of(Util.intArray(freq.length))); + //Filling order + Integer[] tmp = Util.intArray(freq.length); + Vector order = new Vector(0); + for (int i : tmp) { + order.add(i); + } order.sort((i1, i2) -> (int) (10000 * (circles[i2].getAbsolute() - circles[i1].getAbsolute()))); Integer[] shaft = new Integer[freq.length]; order.toArray(shaft);