JDK-6974391 : Refactor TrustDecider to avoid unneeded work
  • Type: Enhancement
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 7
  • Priority: P2
  • Status: Resolved
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2010-08-04
  • Updated: 2014-07-30
  • Resolved: 2014-02-12
Related Reports
Relates :  
Description
TrustDecider became overly complicated and hard to maintain. It also does too much of uneeded work and needs refactoring.

Few things that needs to be true:
  1) Certificate stores should never be loaded more than once
  2) We should be loading stores as we need them - if first one is sufficient to comfirm certificate validity then we do not need to load others.
  3) isAllPermissionsGranted should not be synchronized itself but it should be safe for the concurent use. If dialog is shown then it should not prevent other certificates to be validated if any.
  4) We do not want to have static methods. Instead we need to have clean interface and be able to have different implementations 
     (e.g. for testing). 
  5) Need unit tests and benchmarks

More careful analysis of the code is required to identify additional steps.

Comments
significant refactoring has gradually occurred since this was filed in 2010, some but not all of the requests made here have been implemented. I am closing this as will not fix, and any other opportunities to optimize the code will be taken on a case by case basis.
12-02-2014