code
stringlengths
73
34.1k
label
stringclasses
1 value
private static boolean functionsAreAllowed(boolean isAddAllFunction, boolean isPutAllFunction,Class<?> classD,Class<?> classS) { if(isAddAllFunction) return collectionIsAssignableFrom(classD) && collectionIsAssignableFrom(classS); if(isPutAllFunction) return mapIsAssignableFrom(classD) && mapIsAss...
java
public static String getGenericString(Field field){ String fieldDescription = field.toGenericString(); List<String> splitResult = new ArrayList<String>(); char[] charResult = fieldDescription.toCharArray(); boolean isFinished = false; int separatorIndex = fieldDescription.indexOf(" "); int pre...
java
public static boolean areEqual(Field destination,Field source){ return getGenericString(destination).equals(getGenericString(source)); }
java
public static String mapperClassName(Class<?> destination, Class<?> source, String resource){ String className = destination.getName().replaceAll("\\.","") + source.getName().replaceAll("\\.",""); if(isEmpty(resource)) return className; if(!isPath(resource)) return write(className, String....
java
public static boolean areMappedObjects(Class<?> dClass,Class<?> sClass,XML xml){ return isMapped(dClass,xml) || isMapped(sClass,xml); }
java
private static boolean isMapped(Class<?> aClass,XML xml){ return xml.isInheritedMapped(aClass) || Annotation.isInheritedMapped(aClass); }
java
public static List<Class<?>> getAllsuperClasses(Class<?> aClass){ List<Class<?>> result = new ArrayList<Class<?>>(); result.add(aClass); Class<?> superclass = aClass.getSuperclass(); while(!isNull(superclass) && superclass != Object.class){ result.add(superclass); superclass = superclass.getSupercla...
java
public InfoOperation getInfoOperation(final Field destination, final Field source) { Class<?> dClass = destination.getType(); Class<?> sClass = source.getType(); Class<?> dItem = null; Class<?> sItem = null; InfoOperation operation = new InfoOperation().setConversionType(UNDEFINED); // Arr...
java
private MapperConstructor getMapper(String dName){ return new MapperConstructor(destinationType(), sourceType(), dName, dName, getSName(), configChosen, xml,methodsToGenerate); }
java
public Map<String,String> getMappings(){ HashMap<String, String> mappings = new HashMap<String, String> (); HashMap<String, Boolean> destInstance = new HashMap<String, Boolean>(); String s = "V"; destInstance.put("null", true ); destInstance.put("v" , false ); HashMap<String, N...
java
private String wrappedMapping(boolean makeDest,NullPointerControl npc,MappingType mtd,MappingType mts){ String sClass = source.getName(); String dClass = destination.getName(); String str = (makeDest?" "+sClass+" "+stringOfGetSource +" = ("+sClass+") $1;" :" "+dClass+" "+stringO...
java
public StringBuilder mapping(boolean makeDest,MappingType mtd,MappingType mts){ StringBuilder sb = new StringBuilder(); if(isNullSetting(makeDest, mtd, mts, sb)) return sb; if(makeDest) sb.append(newInstance(destination, stringOfSetDestination)); for (ASimpleOperation simpleOperation : s...
java
private <T extends AGeneralOperation>T setOperation(T operation,MappingType mtd,MappingType mts){ operation.setMtd(mtd).setMts(mts) .initialDSetPath(stringOfSetDestination) .initialDGetPath(stringOfGetDestination) .initialSGetPath(stringOfGetSource); return operation; }
java
private boolean isNullSetting(boolean makeDest,MappingType mtd,MappingType mts,StringBuilder result){ if( makeDest && (mtd == ALL_FIELDS||mtd == ONLY_VALUED_FIELDS) && mts == ONLY_NULL_FIELDS){ result.append(" "+stringOfSetDestination+"(null);"+newLine); return true; } return false; }
java
private final StringBuilder genericFlow(boolean newInstance){ // if newInstance is true or mapping type of newField is ONLY_NULL_FIELDS // write the mapping for the new field if(newInstance || getMtd() == ONLY_NULL_FIELDS) return sourceControl(fieldToCreate()); // if is enrichment case and ma...
java
private StringBuilder sourceControl(StringBuilder mapping){ if(getMts() == ALL_FIELDS && !sourceType().isPrimitive()){ StringBuilder write = write(" if(",getSource(),"!=null){",newLine, sharedCode(mapping) ,newLine, " }"); if(!destinationType().isPrimitive() && !av...
java
@Deprecated public static Redirect moved(String url, Object... args) { touchPayload().message(url, args); return _INSTANCE; }
java
public Binder<T> attribute(String key, Object value) { if (null == value) { attributes.remove(value); } else { attributes.put(key, value); } return this; }
java
public Binder<T> attributes(Map<String, Object> attributes) { this.attributes.putAll(attributes); return this; }
java
static boolean isPortAvailable(int port) { ServerSocket ss = null; try { ss = new ServerSocket(port); ss.setReuseAddress(true); return true; } catch (IOException ioe) { // NOSONAR return false; } finally { closeQuietly(ss); ...
java
public RenderBinary name(String attachmentName) { this.name = attachmentName; this.disposition = Disposition.of(S.notBlank(attachmentName)); return this; }
java
private static void addNonHeapMetrics(Collection<Metric<?>> result) { MemoryUsage memoryUsage = ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage(); result.add(newMemoryMetric("nonheap.committed", memoryUsage.getCommitted())); result.add(newMemoryMetric("nonheap.init", memoryUsage.getIni...
java
protected void addBasicMetrics(Collection<Metric<?>> result) { // NOTE: ManagementFactory must not be used here since it fails on GAE Runtime runtime = Runtime.getRuntime(); result.add(newMemoryMetric("mem", runtime.totalMemory() + getTotalNonHeapMemoryIfPossible())); result.add(newMemor...
java
protected void addClassLoadingMetrics(Collection<Metric<?>> result) { ClassLoadingMXBean classLoadingMxBean = ManagementFactory.getClassLoadingMXBean(); result.add(new Metric<>("classes", (long) classLoadingMxBean.getLoadedClassCount())); result.add(new Metric<>("classes.loaded", classLoadingMxB...
java
protected void addGarbageCollectionMetrics(Collection<Metric<?>> result) { List<GarbageCollectorMXBean> garbageCollectorMxBeans = ManagementFactory.getGarbageCollectorMXBeans(); for (GarbageCollectorMXBean garbageCollectorMXBean : garbageCollectorMxBeans) { String name = beautifyGcName(garba...
java
protected void addHeapMetrics(Collection<Metric<?>> result) { MemoryUsage memoryUsage = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage(); result.add(newMemoryMetric("heap.committed", memoryUsage.getCommitted())); result.add(newMemoryMetric("heap.init", memoryUsage.getInit())); re...
java
protected void addThreadMetrics(Collection<Metric<?>> result) { ThreadMXBean threadMxBean = ManagementFactory.getThreadMXBean(); result.add(new Metric<>("threads.peak", (long) threadMxBean.getPeakThreadCount())); result.add(new Metric<>("threads.daemon", (long) threadMxBean.getDaemonThreadCount(...
java
private void addManagementMetrics(Collection<Metric<?>> result) { try { // Add JVM up time in ms result.add(new Metric<>("uptime", ManagementFactory.getRuntimeMXBean().getUptime())); result.add(new Metric<>("systemload.average", ManagementFactory.getOperatingSystemMXBean().ge...
java
public void invoke(StartupLifecycle lifecycle) { this.initializeAsciiLogo(); this.printLogo(); lifecycle.willInitialize(); this.logInitializationStart(); lifecycle.willCreateSpringContext(); this.initializeApplicationContext(); lifecycle.didCreateSpringContext(...
java
public static void save() { H.Response resp = H.Response.current(); H.Session session = H.Session.current(); serialize(session); H.Flash flash = H.Flash.current(); serialize(flash); }
java
private Connection connect() throws SQLException { if (DefaultContentLoader.localDataSource == null) { LOG.error("Data Source is null"); return null; } final Connection conn = DataSourceUtils.getConnection(DefaultContentLoader.localDataSource); if (c...
java
protected RequestData initializeRequestData(final MessageContext messageContext) { RequestData requestData = new RequestData(); requestData.setMsgContext(messageContext); // reads securementUsername first from the context then from the property String contextUsername = (String) messageC...
java
protected void checkResults(final List<WSSecurityEngineResult> results, final List<Integer> validationActions) throws Wss4jSecurityValidationException { if (!handler.checkReceiverResultsAnyOrder(results, validationActions)) { throw new Wss4jSecurityValidationException("Security processing failed (ac...
java
@SuppressWarnings("unchecked") private void updateContextWithResults(final MessageContext messageContext, final WSHandlerResult result) { List<WSHandlerResult> handlerResults; if ((handlerResults = (List<WSHandlerResult>) messageContext.getProperty(WSHandlerConstants.RECV_RESULTS)) == null) { ...
java
protected void verifyCertificateTrust(WSHandlerResult result) throws WSSecurityException { List<WSSecurityEngineResult> signResults = result.getActionResults().getOrDefault(WSConstants.SIGN, emptyList()); if (signResults.isEmpty()) { throw new Wss4jSecurityValidationException("No action resu...
java
protected void verifyTimestamp(WSHandlerResult result) throws WSSecurityException { List<WSSecurityEngineResult> insertTimestampResults = result.getActionResults().getOrDefault(WSConstants.TS, emptyList()); if (insertTimestampResults.isEmpty()) { throw new Wss4jSecurityValidationException("N...
java
public static void addMissingColumns(SQLiteDatabase database, Class contractClass) { Contract contract = new Contract(contractClass); Cursor cursor = database.rawQuery("PRAGMA table_info(" + contract.getTable() + ")", null); for (ContractField field : contract.getFields()) { if (!f...
java
public TableBuilder addConstraint(String columnName, String constraintType, String constraintConflictClause) { constraints.add(new Constraint(columnName, constraintType, constraintConflictClause)); return this; }
java
@Deprecated public static Predicate<ColumnModel> allOf(final Predicate<ColumnModel>... conditions) { return (cM) -> Arrays.stream(conditions) .allMatch(c -> c.test(cM)); }
java
@Deprecated public static Predicate<ColumnModel> anyOf(final Predicate<ColumnModel>... conditions) { return (cM) -> Arrays.stream(conditions) .anyMatch(c -> c.test(cM)); }
java
public static Predicate<ColumnModel> oneOf(final Predicate<ColumnModel>... conditions) { return (cM) -> Arrays.stream(conditions) .map(c -> c.test(cM)).filter(b -> b).count() == 1; }
java
@Override public <T extends RedGEntity> T getDummy(final AbstractRedG redG, final Class<T> dummyClass) { // check if a dummy for this type already exists in cache if (this.dummyCache.containsKey(dummyClass)) { return dummyClass.cast(this.dummyCache.get(dummyClass)); } ...
java
private boolean hasTemplate(String href) { if (href == null) { return false; } return URI_TEMPLATE_PATTERN.matcher(href).find(); }
java
private static void processJoinTables(final List<TableModel> result, final Map<String, Map<Table, List<String>>> joinTableMetadata) { joinTableMetadata.entrySet().forEach(entry -> { LOG.debug("Processing join tables for {}. Found {} join tables to process", entry.getKey(), entry.getValue().size())...
java
private static Map<String, Map<Table, List<String>>> mergeJoinTableMetadata(Map<String, Map<Table, List<String>>> data, Map<String, Map<Table, List<String>>> extension) { for (String key : extension.keySet()) { Map<Ta...
java
private String validatePath(String path, int line) throws ParseException { if (!path.startsWith("/")) { throw new ParseException("Path must start with '/'", line); } boolean openedKey = false; for (int i=0; i < path.length(); i++) { boolean validChar = isValidCharForPath(path.charAt(i), openedKey); i...
java
private boolean isValidCharForPath(char c, boolean openedKey) { char[] invalidChars = { '?', '#', ' ' }; for (char invalidChar : invalidChars) { if (c == invalidChar) { return false; } } if (openedKey) { char[] moreInvalidChars = { '/', '{' }; for (char invalidChar : moreInvalidChars) { if ...
java
public static void notEmpty(String value, String message) throws IllegalArgumentException { if (value == null || "".equals(value.trim())) { throw new IllegalArgumentException("A precondition failed: " + message); } }
java
protected void initPathVariables(String routePath) { pathVariables.clear(); List<String> variables = getVariables(routePath); String regexPath = routePath.replaceAll(Path.VAR_REGEXP, Path.VAR_REPLACE); Matcher matcher = Pattern.compile("(?i)" + regexPath).matcher(getPath()); matcher.matches(); // start...
java
private List<String> getVariables(String routePath) { List<String> variables = new ArrayList<String>(); Matcher matcher = Pattern.compile(Path.VAR_REGEXP).matcher(routePath); while (matcher.find()) { // group(0) always stands for the entire expression and we only want what is inside the {} variables.add(ma...
java
public ConfigurationBuilder withRemoteSocket(String host, int port) { configuration.connector = new NioSocketConnector(); configuration.address = new InetSocketAddress(host, port); return this; }
java
public ConfigurationBuilder withSerialPort(String serialPort, int baudRate) { configuration.connector = new SerialConnector(); configuration.address = new SerialAddress(serialPort, baudRate, DataBits.DATABITS_8, StopBits.BITS_1, Parity.NONE, FlowControl.NONE ); return this; }
java
public Configuration build() { if (configuration.connector == null || configuration.address == null) { throw new IllegalArgumentException("You must call either withRemoteSocket or withSerialPort."); } return configuration; }
java
public static Catalog crawlDatabase(final Connection connection, final InclusionRule schemaRule, final InclusionRule tableRule) throws SchemaCrawlerException { final SchemaCrawlerOptions options = SchemaCrawlerOptionsBuilder.builder() .withSchemaInfoLevel(SchemaInfoLevelBuilder.standard().setR...
java
public String generateMainClass(final Collection<TableModel> tables, final boolean enableVisualizationSupport) { Objects.requireNonNull(tables); //get package from the table models final String targetPackage = ((TableModel) tables.toArray()[0]).getPackageName(); final ST template =...
java
public RedGBuilder<T> withDefaultValueStrategy(final DefaultValueStrategy strategy) { if (instance == null) { throw new IllegalStateException("Using the builder after build() was called is not allowed!"); } instance.setDefaultValueStrategy(strategy); return this; }
java
public RedGBuilder<T> withPreparedStatementParameterSetter(final PreparedStatementParameterSetter setter) { if (instance == null) { throw new IllegalStateException("Using the builder after build() was called is not allowed!"); } instance.setPreparedStatementParameterSetter(setter); ...
java
public RedGBuilder<T> withSqlValuesFormatter(final SQLValuesFormatter formatter) { if (instance == null) { throw new IllegalStateException("Using the builder after build() was called is not allowed!"); } instance.setSqlValuesFormatter(formatter); return this; }
java
public RedGBuilder<T> withDummyFactory(final DummyFactory dummyFactory) { if (instance == null) { throw new IllegalStateException("Using the builder after build() was called is not allowed!"); } instance.setDummyFactory(dummyFactory); return this; }
java
private boolean isOneOf(char ch, final char[] charray) { boolean result = false; for (int i = 0; i < charray.length; i++) { if (ch == charray[i]) { result = true; break; } } return result; }
java
public static String get() { String env = System.getProperty("JOGGER_ENV"); if (env == null) { env = System.getenv("JOGGER_ENV"); } if (env == null) { return "dev"; } return env; }
java
public List<String> generateSQLStatements() { return getEntitiesSortedForInsert().stream() .map(RedGEntity::getSQLString) .collect(Collectors.toList()); }
java
@Override public String getMethodNameForReference(final ForeignKey foreignKey) { final Column c = foreignKey.getColumnReferences().get(0).getForeignKeyColumn(); // check if only one-column fk if (foreignKey.getColumnReferences().size() == 1) { return getMethodNameForColumn(c...
java
public void handle(Request request, Response response) throws Exception { if (Environment.isDevelopment()) { this.middlewares = this.middlewareFactory.create(); } try { handle(request, response, new ArrayList<Middleware>(Arrays.asList(middlewares))); } catch (Exception e) { if (exceptionHandler != n...
java
private synchronized void performReliableSubscription() { // If timer is not running, initialize it. if (subscriberTimer == null) { LOGGER.info("Initializing reliable subscriber"); subscriberTimer = createTimerInternal(); ExponentialBackOff backOff = new ExponentialBa...
java
@VisibleForTesting protected Mesos startInternal() { String version = System.getenv("MESOS_API_VERSION"); if (version == null) { version = "V0"; } LOGGER.info("Using Mesos API version: {}", version); if (version.equals("V0")) { if (credential == null...
java
public TableModel extractTableModel(final Table table) { Objects.requireNonNull(table); final TableModel model = new TableModel(); model.setClassName(this.classPrefix + this.nameProvider.getClassNameForTable(table)); model.setName(this.nameProvider.getClassNameForTable(table)); ...
java
private ServletRequest init() throws MultipartException, IOException { // retrieve multipart/form-data parameters if (Multipart.isMultipartContent(request)) { Multipart multipart = new Multipart(); multipart.parse(request, new PartHandler() { @Override public void handleFormItem(String name, String v...
java
private String fixRequestPath(String path) { return path.endsWith("/") ? path.substring(0, path.length() - 1) : path; }
java
private List<Interceptor> getInterceptors(String path) { List<Interceptor> ret = new ArrayList<Interceptor>(); for (InterceptorEntry entry : getInterceptors()) { if (matches(path, entry.getPaths())) { ret.add(entry.getInterceptor()); } } return ret; }
java
private boolean matchesPath(String routePath, String pathToMatch) { routePath = routePath.replaceAll(Path.VAR_REGEXP, Path.VAR_REPLACE); return pathToMatch.matches("(?i)" + routePath); }
java
public static boolean isMultipartContent(HttpServletRequest request) { if (!"post".equals(request.getMethod().toLowerCase())) { return false; } String contentType = request.getContentType(); if (contentType == null) { return false; } if (contentType.toLowerCase().startsWith(MULTIPART)) { return tr...
java
protected Map<String,String> getHeadersMap(String headerPart) { final int len = headerPart.length(); final Map<String,String> headers = new HashMap<String,String>(); int start = 0; for (;;) { int end = parseEndOfLine(headerPart, start); if (start == end) { break; } String header = headerPart.su...
java
private String getFieldName(String contentDisposition) { String fieldName = null; if (contentDisposition != null && contentDisposition.toLowerCase().startsWith(FORM_DATA)) { ParameterParser parser = new ParameterParser(); parser.setLowerCaseNames(true); // parameter parser can handle null input Map<St...
java
protected byte[] getBoundary(String contentType) { ParameterParser parser = new ParameterParser(); parser.setLowerCaseNames(true); // Parameter parser can handle null input Map<String,String> params = parser.parse(contentType, new char[] {';', ','}); String boundaryStr = (String) params.get("boundary"); if...
java
private String getFileName(String contentDisposition) { String fileName = null; if (contentDisposition != null) { String cdl = contentDisposition.toLowerCase(); if (cdl.startsWith(FORM_DATA) || cdl.startsWith(ATTACHMENT)) { ParameterParser parser = new ParameterParser(); parser.setLowerCaseNames(tr...
java
public void connect() throws Exception { // Start up our MINA stuff // Setup MINA codecs final IT100CodecFactory it100CodecFactory = new IT100CodecFactory(); final ProtocolCodecFilter protocolCodecFilter = new ProtocolCodecFilter(it100CodecFactory); final CommandLogFilter loggingFilter = new CommandLogFilt...
java
public void disconnect() throws Exception { if (session != null) { session.getCloseFuture().awaitUninterruptibly(); } if (connector != null) { connector.dispose(); } }
java
public static int registerBitSize(final long expectedUniqueElements) { return Math.max(HLL.MINIMUM_REGWIDTH_PARAM, (int)Math.ceil(NumberUtil.log2(NumberUtil.log2(expectedUniqueElements)))); }
java
public static double alphaMSquared(final int m) { switch(m) { case 1/*2^0*/: case 2/*2^1*/: case 4/*2^2*/: case 8/*2^3*/: throw new IllegalArgumentException("'m' cannot be less than 16 (" + m + " < 16)."); case 16/*2^4*/: ...
java
public long cardinality() { switch(type) { case EMPTY: return 0/*by definition*/; case EXPLICIT: return explicitStorage.size(); case SPARSE: return (long)Math.ceil(sparseProbabilisticAlgorithmCardinality()); case FUL...
java
public void union(final HLL other) { // TODO: verify HLLs are compatible final HLLType otherType = other.getType(); if(type.equals(otherType)) { homogeneousUnion(other); return; } else { heterogenousUnion(other); return; } }
java
private void homogeneousUnion(final HLL other) { switch(type) { case EMPTY: // union of empty and empty is empty return; case EXPLICIT: for(final long value : other.explicitStorage) { addRaw(value); } // NOTE...
java
public byte[] toBytes(final ISchemaVersion schemaVersion) { final byte[] bytes; switch(type) { case EMPTY: bytes = new byte[schemaVersion.paddingBytes(type)]; break; case EXPLICIT: { final IWordSerializer serializer = ...
java
public void getRegisterContents(final IWordSerializer serializer) { for(final LongIterator iter = registerIterator(); iter.hasNext();) { serializer.writeWord(iter.next()); } }
java
private static Date parseDate(@SuppressWarnings("SameParameterValue") String stringDate) { try { return formatter.parse(stringDate); } catch (ParseException e) { e.printStackTrace(); return null; } }
java
protected MavenPomDescriptor createMavenPomDescriptor(Model model, Scanner scanner) { ScannerContext context = scanner.getContext(); MavenPomDescriptor pomDescriptor = context.peek(MavenPomDescriptor.class); if (model instanceof EffectiveModel) { context.getStore().addDescriptorType(...
java
private void addActivation(MavenProfileDescriptor mavenProfileDescriptor, Activation activation, Store store) { if (null == activation) { return; } MavenProfileActivationDescriptor profileActivationDescriptor = store.create(MavenProfileActivationDescriptor.class); mavenProfil...
java
private void addConfiguration(ConfigurableDescriptor configurableDescriptor, Xpp3Dom config, Store store) { if (null == config) { return; } MavenConfigurationDescriptor configDescriptor = store.create(MavenConfigurationDescriptor.class); configurableDescriptor.setConfiguratio...
java
private <P extends MavenDependentDescriptor, D extends AbstractDependencyDescriptor> List<MavenDependencyDescriptor> getDependencies(P dependent, List<Dependency> dependencies, Class<D> dependsOnType, ScannerContext scannerContext) { Store store = scannerContext.getStore(); List<MavenDepende...
java
private void addExecutionGoals(MavenPluginExecutionDescriptor executionDescriptor, PluginExecution pluginExecution, Store store) { List<String> goals = pluginExecution.getGoals(); for (String goal : goals) { MavenExecutionGoalDescriptor goalDescriptor = store.create(MavenExecutionGoalDescrip...
java
private void addLicenses(MavenPomDescriptor pomDescriptor, Model model, Store store) { List<License> licenses = model.getLicenses(); for (License license : licenses) { MavenLicenseDescriptor licenseDescriptor = store.create(MavenLicenseDescriptor.class); licenseDescriptor.setUrl(...
java
private void addDevelopers(MavenPomDescriptor pomDescriptor, Model model, Store store) { List<Developer> developers = model.getDevelopers(); for (Developer developer : developers) { MavenDeveloperDescriptor developerDescriptor = store.create(MavenDeveloperDescriptor.class); devel...
java
private List<MavenDependencyDescriptor> addManagedDependencies(MavenDependentDescriptor pomDescriptor, DependencyManagement dependencyManagement, ScannerContext scannerContext, Class<? extends AbstractDependencyDescriptor> relationClass) { if (dependencyManagement == null) { return Colle...
java
private void addManagedPlugins(BaseProfileDescriptor pomDescriptor, BuildBase build, ScannerContext scannerContext) { if (null == build) { return; } PluginManagement pluginManagement = build.getPluginManagement(); if (null == pluginManagement) { return; } ...
java
private List<MavenPluginDescriptor> createMavenPluginDescriptors(List<Plugin> plugins, ScannerContext context) { Store store = context.getStore(); List<MavenPluginDescriptor> pluginDescriptors = new ArrayList<>(); for (Plugin plugin : plugins) { MavenPluginDescriptor mavenPluginDescr...
java
private void addModules(BaseProfileDescriptor pomDescriptor, List<String> modules, Store store) { for (String module : modules) { MavenModuleDescriptor moduleDescriptor = store.create(MavenModuleDescriptor.class); moduleDescriptor.setName(module); pomDescriptor.getModules().a...
java
private void addParent(MavenPomDescriptor pomDescriptor, Model model, ScannerContext context) { Parent parent = model.getParent(); if (null != parent) { ArtifactResolver resolver = getArtifactResolver(context); MavenArtifactDescriptor parentDescriptor = resolver.resolve(new Paren...
java
private void addPluginExecutions(MavenPluginDescriptor mavenPluginDescriptor, Plugin plugin, Store store) { List<PluginExecution> executions = plugin.getExecutions(); for (PluginExecution pluginExecution : executions) { MavenPluginExecutionDescriptor executionDescriptor = store.create(MavenP...
java
private void addPlugins(BaseProfileDescriptor pomDescriptor, BuildBase build, ScannerContext scannerContext) { if (null == build) { return; } List<Plugin> plugins = build.getPlugins(); List<MavenPluginDescriptor> pluginDescriptors = createMavenPluginDescriptors(plugins, scann...
java