/** * The option is expected to be in decimal and positive. In case of * error, zero is returned. * @return the precision option */ protected int extractPrecisionOption() { String opt = extractOption(); int r = 0; if (opt != null) { try { r = Integer.parseInt(opt); if (r <= 0) { System.err.println("Precision option (" + opt + ") isn't a positive integer."); r = 0; } } catch (NumberFormatException e) { System.err.println("Category option '" + opt + "' not a decimal integer." + e.getMessage()); } } return r; }
/** * The option is expected to be in decimal and positive. In case of * error, zero is returned. */ protected int extractPrecisionOption() { String opt = extractOption(); int r = 0; if (opt != null) { try { r = Integer.parseInt(opt); if (r <= 0) { System.err.println("Precision option (" + opt + ") isn't a positive integer."); r = 0; } } catch (NumberFormatException e) { System.err.println("Category option '" + opt + "' not a decimal integer." + e.getMessage()); } } return r; }
/** * The option is expected to be in decimal and positive. In case of * error, zero is returned. */ protected int extractPrecisionOption() { String opt = extractOption(); int r = 0; if (opt != null) { try { r = Integer.parseInt(opt); if (r <= 0) { System.err.println("Precision option (" + opt + ") isn't a positive integer."); r = 0; } } catch (NumberFormatException e) { System.err.println("Category option '" + opt + "' not a decimal integer." + e.getMessage()); } } return r; }
String dateFormatStr = AbsoluteTimeDateFormat.ISO8601_DATE_FORMAT; DateFormat df; String dOpt = extractOption(); if (dOpt != null) dateFormatStr = dOpt; break; case 'X': String xOpt = extractOption(); pc = new MDCPatternConverter(formattingInfo, xOpt); currentLiteral.setLength(0);
String dateFormatStr = AbsoluteTimeDateFormat.ISO8601_DATE_FORMAT; DateFormat df; String dOpt = extractOption(); if (dOpt != null) dateFormatStr = dOpt; break; case 'X': String xOpt = extractOption(); pc = new MDCPatternConverter(formattingInfo, xOpt); currentLiteral.setLength(0);
String dateFormatStr = AbsoluteTimeDateFormat.ISO8601_DATE_FORMAT; DateFormat df; String dOpt = extractOption(); if (dOpt != null) dateFormatStr = dOpt; case 'X': case 'Z': String xOpt = extractOption(); pc = new MDCPatternConverter(formattingInfo, xOpt); currentLiteral.setLength(0);