private synchronized void checkHandlerPkgs ( ) { String handlerPkgsProp = System . getProperty ( "java.protocol.handler.pkgs" ) ; if ( handlerPkgsProp != null && handlerPkgsProp . equals ( lastHandlerPkgs ) == false ) { // Update the handlerPkgs[] from the handlerPkgsProp StringTokenizer tokeninzer = new StringTokenizer ( handlerPkgsProp , "|" ) ; ArrayList < String > tmp = new ArrayList < String > ( ) ; while ( tokeninzer . hasMoreTokens ( ) ) { String pkg = tokeninzer . nextToken ( ) . intern ( ) ; if ( tmp . contains ( pkg ) == false ) tmp . add ( pkg ) ; } // Include the JBoss default protocol handler pkg if ( tmp . contains ( PACKAGE_PREFIX ) == false ) tmp . add ( PACKAGE_PREFIX ) ; handlerPkgs = new String [ tmp . size ( ) ] ; tmp . toArray ( handlerPkgs ) ; lastHandlerPkgs = handlerPkgsProp ; } }
See if the java . protocol . handler . pkgs system property has changed and if it has parse it to update the handlerPkgs array .