From b721e582d8e40052337b8c7e76f57b425667286a Mon Sep 17 00:00:00 2001 From: Sergio Giro Date: Thu, 1 Dec 2016 19:19:08 +0000 Subject: [PATCH] sun.security.pkcs: type tyding. Port from jdk8u60 Changes that don't affect behaviour: add casts and generics. Bug: 29631070 Test: make droid Change-Id: Iee63b71302833430fc1cb5b90f6448e183e6e8b6 --- .../src/main/java/sun/security/pkcs/PKCS9Attribute.java | 8 ++++---- ojluni/src/main/java/sun/security/pkcs/SignerInfo.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ojluni/src/main/java/sun/security/pkcs/PKCS9Attribute.java b/ojluni/src/main/java/sun/security/pkcs/PKCS9Attribute.java index 9ae4a9937..d847b1049 100644 --- a/ojluni/src/main/java/sun/security/pkcs/PKCS9Attribute.java +++ b/ojluni/src/main/java/sun/security/pkcs/PKCS9Attribute.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -331,11 +331,11 @@ public class PKCS9Attribute implements DerEncoder { {new Byte(DerValue.tag_Sequence)} // SignatureTimestampToken }; - private static final Class[] VALUE_CLASSES = new Class[18]; + private static final Class[] VALUE_CLASSES = new Class[18]; static { try { - Class str = Class.forName("[Ljava.lang.String;"); + Class str = Class.forName("[Ljava.lang.String;"); VALUE_CLASSES[0] = null; // not used VALUE_CLASSES[1] = str; // EMailAddress @@ -489,8 +489,8 @@ public PKCS9Attribute(DerValue derVal) throws IOException { if (val.length != 2) throw new IOException("PKCS9Attribute doesn't have two components"); - // get the oid + // get the oid oid = val[0].getOID(); byte[] content = val[1].toByteArray(); DerValue[] elems = new DerInputStream(content).getSet(1); diff --git a/ojluni/src/main/java/sun/security/pkcs/SignerInfo.java b/ojluni/src/main/java/sun/security/pkcs/SignerInfo.java index 3a024b0bc..e5f3e1dea 100644 --- a/ojluni/src/main/java/sun/security/pkcs/SignerInfo.java +++ b/ojluni/src/main/java/sun/security/pkcs/SignerInfo.java @@ -327,7 +327,7 @@ SignerInfo verify(PKCS7 block, InputStream inputStream) authenticatedAttributes.getAttributeValue( PKCS9Attribute.CONTENT_TYPE_OID); if (contentType == null || - !contentType.equals(content.contentType)) + !contentType.equals((Object)content.contentType)) return null; // contentType does not match, bad SignerInfo // now, check message digest