/** * Get the start of zone information if the input ends * with 'Z' or +/-hh:mm. If a zone string is not * found, return -1; if the zone string is invalid, * return -2. */ private static int getZoneStart (String datetime) { if (datetime.indexOf("Z") == datetime.lengt...
valueOf(is) == FileMagic.OOXML) { XWPFDocument doc = new XWPFDocument(is); XWPFWordExtractor extractor = new XWPFWordExtractor(doc); text = extractor.getText(); extractor.close(); } } catch (OfficeXmlFileException e) { logger.error(filePath, e); } finally { if (is != null) { is....
createRow(startRowNum); for (int i = 0; i < mapping.size(); i++) { String name = mapping.get(i); Object obj = rowData.get(name); Cell newCell = row.createCell(i); CellStyle style = styles.get(i); newCell.setCellStyle(style); if (obj != null) { if (obj instanceof Date)...
getDataSourceOfDimension(dimension); IDataSourceDAO dataSourceDAO = DAOFactory.getDataSourceDAO(); IDataSource dataSource = dataSourceDAO.loadDataSourceByLabel(dataSourceName); // 2 - Execute DELETE connection = dataSource.getConnection(); HierarchyUtils.deleteHierarchy(dimension, hierarchyName, data...
getILoggerFactory(); if (factory instanceof LoggerContext) { return (LoggerContext) factory; } // Pax-Logging registers a custom implementation of ILoggerFactory which hides logback; as a workaround // we set org.ops4j.pax.logging.StaticLogbackContext=true in system.properties and access it ...
getRequestBody() != null && bodyArgumentClasses != null) { for (JavaType argument :bodyArgumentClasses) { jt[i] = argument; i += 1; } } return jt; } Example #24Source File: OpenAPIResolverTest.java From swagger-parser with Apache License 2.0 5 votes @Test public void allOfExample...
getSheetAt(i); int rows = sheet.getPhysicalNumberOfRows(); //遍历每一行 for (int j = 0; j < rows; j++) { HSSFRow hr = sheet.getRow(j); Iterator<?> it = hr.iterator(); while(it.hasNext()){ String context = it.next().toString(); System.out.println(context); } } } ...
/** * Discovers a {@link EncodingFormat} of the given type using the given option (if present) as factory * identifier. */ public <I, F extends EncodingFormatFactory<I>> Optional<EncodingFormat<I>> discoverOptionalEncodingFormat( Class<F> formatFactoryClass, ConfigOption<String> formatOption...
findTopByCodeAndPeriodOfValidityGreaterThanEqual(code, new Date()) != null) { code = IdUtil.fastSimpleUUID().substring(0, 6); } InviteCode newInviteCode = param.convertToPo(code, setting.getInviteCodeEffectiveDuration()); inviteCodeRepo.save(newInviteCode); return newInviteCode.getId(); ...
*/ @Override public void onRemoval(@Nullable String key, @Nullable ZipkinTrace trace, @Nonnull RemovalCause cause) { if (trace instanceof ZipkinTrace.TriggerTrace) { return; } try { Zipkin2SkyWalkingTransfer.INSTANCE.transfer(trace); } catch (Exception e) { logger.error(e.getMessage(), e)...