Skip to content

Commit 9184f1b

Browse files
committed
refactor of IESKEMParameterSpec
1 parent 1443e7b commit 9184f1b

File tree

3 files changed

+121
-2
lines changed

3 files changed

+121
-2
lines changed

core/src/main/jdk1.1/java/util/Collections.java

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,4 +383,123 @@ public String toString()
383383
return c.toString();
384384
}
385385
}
386+
387+
public static Set synchronizedSet(Set set)
388+
{
389+
return new SyncSet(set);
390+
}
391+
392+
static class SyncSet implements Set
393+
{
394+
private Set base;
395+
396+
SyncSet(Set base)
397+
{
398+
this.base = base;
399+
}
400+
401+
public int size()
402+
{
403+
synchronized (base)
404+
{
405+
return base.size();
406+
}
407+
}
408+
409+
public boolean isEmpty()
410+
{
411+
synchronized (base)
412+
{
413+
return base.isEmpty();
414+
}
415+
}
416+
417+
public boolean contains(Object o)
418+
{
419+
synchronized (base)
420+
{
421+
return base.contains(o);
422+
}
423+
}
424+
425+
public Iterator iterator()
426+
{
427+
synchronized (base)
428+
{
429+
return new ArrayList(base).iterator();
430+
}
431+
}
432+
433+
public Object[] toArray()
434+
{
435+
synchronized (base)
436+
{
437+
return base.toArray();
438+
}
439+
}
440+
441+
public boolean add(Object o)
442+
{
443+
synchronized (base)
444+
{
445+
return base.add(o);
446+
}
447+
}
448+
449+
public boolean remove(Object o)
450+
{
451+
synchronized (base)
452+
{
453+
return base.remove(o);
454+
}
455+
}
456+
457+
public boolean addAll(Collection collection)
458+
{
459+
synchronized (base)
460+
{
461+
return base.addAll(collection);
462+
}
463+
}
464+
465+
public void clear()
466+
{
467+
synchronized (base)
468+
{
469+
base.clear();
470+
}
471+
}
472+
473+
public boolean removeAll(Collection collection)
474+
{
475+
synchronized (base)
476+
{
477+
return base.removeAll(collection);
478+
}
479+
}
480+
481+
public boolean retainAll(Collection collection)
482+
{
483+
synchronized (base)
484+
{
485+
return base.retainAll(collection);
486+
}
487+
}
488+
489+
public boolean containsAll(Collection collection)
490+
{
491+
synchronized (base)
492+
{
493+
return base.containsAll(collection);
494+
}
495+
}
496+
497+
public Object[] toArray(Object[] objects)
498+
{
499+
synchronized (base)
500+
{
501+
return base.toArray(objects);
502+
}
503+
}
504+
}
386505
}

pkix/src/main/java/org/bouncycastle/its/jcajce/JcaETSIDataDecryptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import javax.crypto.SecretKey;
88

99
import org.bouncycastle.its.operator.ETSIDataDecryptor;
10+
import org.bouncycastle.jcajce.spec.IESKEMParameterSpec;
1011
import org.bouncycastle.jcajce.util.JcaJceHelper;
1112
import org.bouncycastle.jcajce.util.NamedJcaJceHelper;
1213
import org.bouncycastle.jcajce.util.ProviderJcaJceHelper;
13-
import org.bouncycastle.jce.spec.IESKEMParameterSpec;
1414
import org.bouncycastle.util.Arrays;
1515

1616

pkix/src/main/java/org/bouncycastle/its/jcajce/JceETSIKeyWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
import org.bouncycastle.asn1.teletrust.TeleTrusTObjectIdentifiers;
1212
import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo;
1313
import org.bouncycastle.its.ETSIKeyWrapper;
14+
import org.bouncycastle.jcajce.spec.IESKEMParameterSpec;
1415
import org.bouncycastle.jcajce.util.DefaultJcaJceHelper;
1516
import org.bouncycastle.jcajce.util.JcaJceHelper;
1617
import org.bouncycastle.jcajce.util.NamedJcaJceHelper;
1718
import org.bouncycastle.jcajce.util.ProviderJcaJceHelper;
18-
import org.bouncycastle.jce.spec.IESKEMParameterSpec;
1919
import org.bouncycastle.oer.its.ieee1609dot2.EncryptedDataEncryptionKey;
2020
import org.bouncycastle.oer.its.ieee1609dot2.basetypes.EccP256CurvePoint;
2121
import org.bouncycastle.oer.its.ieee1609dot2.basetypes.EciesP256EncryptedKey;

0 commit comments

Comments
 (0)