@SuppressWarnings("static-method") @Test public void testExtraParamProcessor() { final String entries = "Clave1=valor\n" + "2=valor\n" + "clave3=v\n" + "4=v\n" + "=v\n" + "5=\n" + "=\n" + "\n" + "=valor\n" + "clave6=\n" + "clave7=val=or\n" + "clave8=valor\n" + "cla=ve9=valor\n" + "clave0\n"; final Properties params = ExtraParamsProcessor.convertToProperties(entries); Assert.assertNotNull(params); for (final String key : params.keySet().toArray(new String[0])) { System.out.println(key + " = " + params.getProperty(key)); } Assert.assertEquals(11, params.size()); }
public static Properties convertToProperties(final String entries) { final Properties params = new Properties(); if (entries == null) { return params; } try { params.load(new ByteArrayInputStream(entries.getBytes())); } catch (final Exception e) { LOGGER.warning( "Se han encontrado entradas no validas en la configuracion de la operacion: " + e ); } return params; }
ExtraParamsProcessor { public static Properties convertToProperties(final String entries) { final Properties params = new Properties(); if (entries == null) { return params; } try { params.load(new ByteArrayInputStream(entries.getBytes())); } catch (final Exception e) { LOGGER.warning( "Se han encontrado entradas no validas en la configuracion de la operacion: " + e ); } return params; } }
ExtraParamsProcessor { public static Properties convertToProperties(final String entries) { final Properties params = new Properties(); if (entries == null) { return params; } try { params.load(new ByteArrayInputStream(entries.getBytes())); } catch (final Exception e) { LOGGER.warning( "Se han encontrado entradas no validas en la configuracion de la operacion: " + e ); } return params; } private  ExtraParamsProcessor(); }
ExtraParamsProcessor { public static Properties convertToProperties(final String entries) { final Properties params = new Properties(); if (entries == null) { return params; } try { params.load(new ByteArrayInputStream(entries.getBytes())); } catch (final Exception e) { LOGGER.warning( "Se han encontrado entradas no validas en la configuracion de la operacion: " + e ); } return params; } private  ExtraParamsProcessor(); static Properties convertToProperties(final String entries); static Properties expandProperties(final Properties params); static Properties expandProperties(final Properties params, final byte[] signedData, final String format); static void configAutoFormat(final AOSigner signer, final byte[] data, final Properties params); }
ExtraParamsProcessor { public static Properties convertToProperties(final String entries) { final Properties params = new Properties(); if (entries == null) { return params; } try { params.load(new ByteArrayInputStream(entries.getBytes())); } catch (final Exception e) { LOGGER.warning( "Se han encontrado entradas no validas en la configuracion de la operacion: " + e ); } return params; } private  ExtraParamsProcessor(); static Properties convertToProperties(final String entries); static Properties expandProperties(final Properties params); static Properties expandProperties(final Properties params, final byte[] signedData, final String format); static void configAutoFormat(final AOSigner signer, final byte[] data, final Properties params);  }