jdk/src/share/classes/java/security/Signature.java
changeset 18181 4f0a36582461
parent 12875 43a1cd4cfc32
child 18579 b678846778ad
equal deleted inserted replaced
18180:e0b8c923f35d 18181:4f0a36582461
     1 /*
     1 /*
     2  * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   246 
   246 
   247     private static Signature getInstance(Instance instance, String algorithm) {
   247     private static Signature getInstance(Instance instance, String algorithm) {
   248         Signature sig;
   248         Signature sig;
   249         if (instance.impl instanceof Signature) {
   249         if (instance.impl instanceof Signature) {
   250             sig = (Signature)instance.impl;
   250             sig = (Signature)instance.impl;
       
   251             sig.algorithm = algorithm;
   251         } else {
   252         } else {
   252             SignatureSpi spi = (SignatureSpi)instance.impl;
   253             SignatureSpi spi = (SignatureSpi)instance.impl;
   253             sig = new Delegate(spi, algorithm);
   254             sig = new Delegate(spi, algorithm);
   254         }
   255         }
   255         sig.provider = instance.provider;
   256         sig.provider = instance.provider;