From a6247e5b3e84d3c7cd66827d1eb31bcf08f98614 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 11 Mar 1999 22:55:24 +0000 Subject: [PATCH] some jdk12 stuff git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@380 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/obfuscator/ClassIdentifier.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jode/jode/obfuscator/ClassIdentifier.java b/jode/jode/obfuscator/ClassIdentifier.java index 11add34..05122f5 100644 --- a/jode/jode/obfuscator/ClassIdentifier.java +++ b/jode/jode/obfuscator/ClassIdentifier.java @@ -186,9 +186,10 @@ public class ClassIdentifier extends Identifier { MethodInfo[] minfos = info.getMethods(); if (Obfuscator.swapOrder) { Random rand = new Random(); - // XXX replace the following for JDK12 with: - // Collections.shuffle(Arrays.asList(finfos), rand); - // Collections.shuffle(Arrays.asList(minfos), rand); +///#ifdef JDK12 +/// Collections.shuffle(Arrays.asList(finfos), rand); +/// Collections.shuffle(Arrays.asList(minfos), rand); +///#else for (int i=1; i < finfos.length; i++) { int j = (Math.abs(rand.nextInt()) % (i+1)); if (j != i) { @@ -205,6 +206,7 @@ public class ClassIdentifier extends Identifier { minfos[j] = tmp; } } +///#endif } fieldCount = finfos.length; identifiers = new Identifier[finfos.length + minfos.length];