id
stringlengths
23
26
content
stringlengths
182
2.49k
codereview_java_data_7125
} @Bean - @ConditionalOnMissingBean public DelegatingResourceLoader delegatingResourceLoader(MavenResourceLoader mavenResourceLoader) { DefaultResourceLoader defaultLoader = new DefaultResourceLoader(); Map<String, ResourceLoader> loaders = new HashMap<>(); I believe this should be: `@ConditionalOnMissingB...
codereview_java_data_7127
*/ public void notifyClientConnected(final Connection connection) { - if (connection.getAbilities() != null && connection.getAbilities().getConfigAbility() != null) { - if (connection.getAbilities().getConfigAbility().isSupportRemoteMetrics()) { - MetricsMonitor.getConfigTota...
codereview_java_data_7131
/** * Attempt to consume the event and update the maintained state * - * @param event the external Action that has occurred * @param roundTimer timer that will fire expiry events that are expected to be received back into * this machine * @return whether this event was consumed or requires ...
codereview_java_data_7140
quotaCheck.checkGroupQuota(con, domainName, group, ctx.getApiName()); - // retrieve our original role Group originalGroup = getGroup(con, domainName, groupName, false, false); // retrieve our original group quotaCheck.checkGroupQuota(con, domainName, g...
codereview_java_data_7141
} } try { - if (jobDefinition instanceof PipelineImpl) { - return newJob((PipelineImpl) jobDefinition, config); - } else { - return newJob((DAG) jobDefinition, config); - ...
codereview_java_data_7152
return entry.getValue(); } - // The non-virtual interface was not found so choose the first virtual one if exists if (!virtualInterfaces.isEmpty()) { for (Entry<String, InterfaceAssociation> entry : virtualInterfaces.entrySet()) { return entry.getValue(); ```suggestion // We did not find any non-vi...
codereview_java_data_7162
@Override public void addObserver(@Nonnull Observer<T> observer) { - this.observers.add(observer); } @Override public void addObserver(@Nonnull Consumer<? super T> onNext, @Nonnull Consumer<? super Throwable> onError, @Nonnull Run...
codereview_java_data_7163
} @Override - public void close() throws Exception { // nothing to do } } does SSLParameters are always `nonNull`? } @Override + public void close() { // nothing to do } }
codereview_java_data_7169
parsed = new ExpandMacros(compiledMod, files, def.kompileOptions, false).expand(parsed); } if (options.kore) { - ModuleToKORE converter = new ModuleToKORE(compiledMod, files, null); parsed = new AddSortInjections(compiledMod).addInjections(parsed, s...
codereview_java_data_7175
} @Override - public void setDataSource(String streamUrl, String username, String password) { - try { - setDataSource(streamUrl); - } catch (IllegalArgumentException e) { - Log.e(TAG, e.toString()); - } catch (IllegalStateException e) { - Log.e(TAG, e.t...
codereview_java_data_7194
}); - @Override - public void onAttach(Context context) { - super.onAttach(context); - } - @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_browse_image, container, fals...
codereview_java_data_7195
@Parameter(names={"--port", "-p"}, description="The port to start the server on.") public int port = 2113; - @Parameter(names={"--socket"}, description="The socket to start the server on.") public String socket = null; } this should say something like "The directory to put the unix domain socket in"...
codereview_java_data_7196
ts.exec("createtable " + tableName + " -sf " + splitsFile, true); Collection<Text> createdSplits = client.tableOperations().listSplits(tableName); assertEquals(expectedSplits, new TreeSet<>(createdSplits)); } finally { - if (Objects.nonNull(splitsFile)) { Files.delete(Paths.get(s...
codereview_java_data_7197
/* - * Copyright 2004-2020 H2 Group. Multiple-Licensed under the MPL 2.0, and the - * EPL 1.0 (https://h2database.com/html/license.html). Initial Developer: H2 - * Group */ package org.h2.command.dml; Please, remove this change. /* + * Copyright 2004-2020 H2 Group. Multiple-Licensed under the MPL 2.0, + * and th...
codereview_java_data_7203
return false; } - private Map<String, Object> createAclAccessConfigMap(Map<String, Object> existedAccoutMap, PlainAccessConfig plainAccessConfig) { Map<String, Object> newAccountsMap = null; - if (existedAccoutMap == null) { newAccountsMap = new LinkedHashMap<Strin...
codereview_java_data_7208
private static final String PREF_SHOW_DOWNLOAD_REPORT = "prefShowDownloadReport"; public static final String PREF_BACK_BUTTON_BEHAVIOR = "prefBackButtonBehavior"; private static final String PREF_BACK_BUTTON_GO_TO_PAGE = "prefBackButtonGoToPage"; - public static final String PREF_QUEUE_SORT_ORDER = "p...
codereview_java_data_7212
if (ruleSetElement.hasAttribute("name")) { ruleSetBuilder.withName(ruleSetElement.getAttribute("name")); } NodeList nodeList = ruleSetElement.getChildNodes(); If there was concern about breaking current usages, perhaps use a default here and log a warning about p...
codereview_java_data_7213
} else { Log.d(TAG, "Activity was started with url " + feedUrl); setLoadingLayout(); - //Remove subscribeonandroid.com from feed URL in order to subscribe to the actual feed URL - if(feedUrl.contains("subscribeonandroid.com")){ - feedUrl = feedUrl....
codereview_java_data_7233
*/ public class AntlrTokenFilter extends BaseTokenFilter<AntlrToken> { - private boolean discardingHiddenTokens = false; - /** * Creates a new AntlrTokenFilter * @param tokenManager The token manager from which to retrieve tokens to be filtered I'm not sure we should be doing it this way... over...
codereview_java_data_7236
} static String usingOffsetPrefix(SecorConfig config) { - return config.getString("secor.offsets.prefix", "offset="); } public ParsedMessage parse(Message message) throws Exception { In secor, we keep the convention that the default value is specified in secor.common.properties, not in Java ...
codereview_java_data_7249
private BlockRead cacheBlock(String _lookup, BlockCache cache, BlockReader _currBlock, String block) throws IOException { - // ACCUMULO-4716 - Define MAX_ARRAY_SIZE smaller than Integer.MAX_VALUE to prevent possible OutOfMemory - // error as described in stackoverflow post: https://stackoverflow.com/a/83...
codereview_java_data_7250
SelectRowCount.response(service); break; case ServerParseSelect.MAX_ALLOWED_PACKET: - SelectMaxAllowedPacket.response(service); break; default: service.execute(stmt, ServerParse.SELECT); whether to reuse Select...
codereview_java_data_7252
" </style>" + "</head><body><p>" + webViewData + "</p></body></html>"; webViewData = webViewData.replace("\n", "<br/>"); - } else { - depth = 0; } webViewData = String.fo...
codereview_java_data_7257
// 1) At least 3 characters // 2) 1st must be a Hex number or a : (colon) // 3) Must contain at least 2 colons (:) - if (s.length() < 3 || !(isHexCharacter(firstChar) || firstChar == ':') || s.indexOf(':') < 0 || StringUtils.countMatches(s, ':') < 2) { ret...
codereview_java_data_7259
String[] entries = new String[speeds.length + 1]; entries[0] = getString(R.string.feed_auto_download_global); - for (int i = 0; i < speeds.length; i++) { - values[i + 1] = speeds[i]; - entries[i + 1] = speeds[i]; - } feedPlaybackSpeedPreference.setEntryValu...
codereview_java_data_7260
LayoutInflater inflater = (LayoutInflater) context .getSystemService(Context.LAYOUT_INFLATER_SERVICE); if (UserPreferences.getFeedFilter() != UserPreferences.FEED_FILTER_NONE) { convertView = inflater.inflate(R.layout.nav_section_filter_divider, parent, false); ...
codereview_java_data_7261
return ruleUnits; } - public void addQueryInRuleUnit(Class<?> ruleUnitType, QueryDescr query) { addRuleUnit(ruleUnitType); queriesByRuleUnit.computeIfAbsent( ruleUnitType, k -> new ArrayList<>() ).add(query); } - public List<QueryDescr> getQueriesInRuleUnit(Class<?> ruleUnitTy...
codereview_java_data_7263
if (maybe != null) result.close(); } - @SuppressWarnings("EmptyCatch") ActiveMQSpanConsumer doInit() { final ActiveMQConnection connection; try { This is fine too though I think `// Ignore` in the catch block is fine too and probably what this check is intending, just making sure you didn't accid...
codereview_java_data_7282
private static class Bin<T> { private final long targetWeight; - private final int itemsPerBin; private final List<T> items = Lists.newArrayList(); private long binWeight = 0L; - Bin(long targetWeight, int itemsPerBin) { this.targetWeight = targetWeight; - this.itemsPerBin = itemsPer...
codereview_java_data_7284
} private void setLicenseSummary(String license) { - licenseSummaryView.setHtmlText(getString(R.string.share_license_summary, getString(Utils.licenseNameFor(license)))); } @Override Upload crashes due to these changes. It seems to me like these changes are related with another PR that you ha...
codereview_java_data_7286
private static TransferStatusUpdater transferStatusUpdater; /** - * Prefix for temporary File created when client uploads an `InputStream`. */ static final String TEMP_FILE_PREFIX = "aws-s3-d861b25a-1edf-11eb-adc1-0242ac120002"; ```suggestion /** * Prefix for temporary File created when client...
codereview_java_data_7295
if (length <= back.length()) { return this; } - final StringBuilder sb = new StringBuilder(back); - sb.append(padding(element, length - back.length())); return new CharSeq(sb.toString()); } let's change signature to ``` java private static void padding(StringB...
codereview_java_data_7309
* A snack bar which has an action button which on click dismisses the snackbar and invokes the listener passed * @param view * @param messageResourceId - * @param retryButtonResourceId * @param onClickListener */ public static void showDismissibleSnackBar(View view, int messageRes...
codereview_java_data_7324
" void f(Optional<String> in, String out) {", " assertThat(in).hasValue(out);", " assertThat(in).hasValue(out);", " assertThat(in).hasValue(out);", " }", "}");...
codereview_java_data_7330
entry("property1", "sampleValueForProperty1"), entry("property2", "sampleValueForProperty2") ) - .doesNotContain(entry("property3", null)); } @Test This is not exactly the same assertion as before. This will pass if there is a ...
codereview_java_data_7335
lastSize[0] = blob.length; metricsJournal.add(entry(System.currentTimeMillis(), blob)); logFine(logger, "Collected %,d metrics, %,d bytes", renderer.getCount(), blob.length); - }, config.getCollectionIntervalSeconds(), config.getCollectionIntervalSeconds(), ...
codereview_java_data_7340
public boolean isValid() { return rowId >= 0 && uniqueId >= 0; } - - @Override - public boolean equals(Object object) { - if (!(object instanceof PartId)){ - return false; - } - - PartId other = (PartId) object; - return rowId == other.rowId && uniqueId == other.uniqueI...
codereview_java_data_7345
} @Test void testSelectNull() { String query = "SELECT NULL AS DUMMY FROM \"product\""; - final String expected = "SELECT CAST(NULL AS NULL) AS \"DUMMY\"\n" + "FROM \"foodmart\".\"product\""; sql(query).ok(expected); } Can we promote the `CAST(NULL AS NULL)` to just `NULL` ? } ...
codereview_java_data_7348
import org.apache.iceberg.actions.Actions; import org.apache.iceberg.actions.RemoveOrphanFilesAction; import org.apache.iceberg.spark.procedures.SparkProcedures.ProcedureBuilder; import org.apache.spark.sql.catalyst.InternalRow; import org.apache.spark.sql.catalyst.util.DateTimeUtils; import org.apache.spark.sql....
codereview_java_data_7350
try { asyncHttpClient .post(url, Header.newInstance().addParam(Constants.NACOS_SERVER_HEADER, VersionUtils.version), - Query.EMPTY, getSelf(), reference.getType(), new AbstractCallback<String>() { ...
codereview_java_data_7358
deregisterVersionUsage(txCounter); } } }; } finally { deregisterVersionUsage(txCounter); How about `read(byte[])`, `read()`, `skip()`? They can be used through JDBC, even more, JDBC layer can use `skip()` by itself. ...
codereview_java_data_7362
"ibft_getPendingVotes", emptyList(), web3jService, ProposalsResponse.class); } - public Request<?, SignersBlockResponse> getValidators(final String blockNumber) { return new Request<>( "ibft_getValidatorsByBlockNumber", singletonList(blockNumber), probably should be called getPropos...
codereview_java_data_7364
} private void displayYouWontSeeNearbyMessage() { - ViewUtil.showLongToast(getActivity(), "You wont see narby place since you didn't gave permission"); } Please make this a string resource and change it to "Unable to display nearest place that needs pictures without location permissions". }...
codereview_java_data_7380
input.endObject(); - return new NodeSummary(nodeId, uri, up, maxSessionCount, stereotypes, used, null); } private static Map<Capabilities, Integer> readCapabilityCounts(JsonInput input) { Pass in an empty set rather than `null` and you'll avoid null pointer exceptions later input.endObjec...
codereview_java_data_7381
PUT, REMOVE } - class It<K, V> extends AbstractIterator<LeafNode<K, V>> { - private final static int MAX_LEVELS = Integer.SIZE / AbstractNode.SIZE + 1; private final int total; private final Object[] nodes = new Object[MAX_LEVELS]; Please name it `LeafNodeIterator` P...
codereview_java_data_7382
txtvSeek.setText(Converter.getDurationStringLong(position)); } } else if (controller.getDuration() != controller.getMedia().getDuration()) { updateUi(controller.getMedia()); } } Doesn't this mean that it will update the UI every single second when the p...
codereview_java_data_7395
import org.openqa.selenium.grid.data.DistributorStatus; import org.openqa.selenium.grid.distributor.Distributor; -import org.openqa.selenium.grid.sessionmap.SessionMap; import org.openqa.selenium.internal.Require; import java.net.URI; I think that this is an unused import import org.openqa.selenium.grid.data.Dis...
codereview_java_data_7396
// since the first call to binRanges clipped the ranges to within a tablet, we should not get only // bin to the set of failed tablets - if (!locator.isValid()) - locator = new TimeoutTabletLocator(TabletLocator.getLocator(instance, new Text(table)), timeout); binRanges(locator, allRanges, binned...
codereview_java_data_7397
package net.sourceforge.pmd.renderers; import java.io.IOException; import java.io.Writer; import java.nio.file.Path; any reason to not use `File.separator` directly? package net.sourceforge.pmd.renderers; +import java.io.File; import java.io.IOException; import java.io.Writer; import java.nio.file.Path;
codereview_java_data_7400
try { // role should not be created if fails to process tags.. - Role dbRole = zmsTest.getRole(mockDomRsrcCtx, domainName, roleName, false, false, false); fail(); } catch(ResourceException ex) { assertEquals(ex.getCode(), ResourceException.NOT_FOUND); ...
codereview_java_data_7401
@Bean @Qualifier("zipkinElasticsearchHttp") @Conditional(isBasicAuthRequired.class) - Interceptor basicAuthInterceptor(ZipkinElasticsearchHttpStorageProperties es) {return new BasicAuthInterceptor(es);} @Bean @ConditionalOnMissingBean revert unnecessary reformatting pls @Bean @Qualifier("zipkinE...
codereview_java_data_7404
log.trace("\'none - no action\' or invalid value provided: {}", action); } - long actionComplete = System.currentTimeMillis(); - log.info("gc post action {} completed in {} seconds", action, - String.format("%.2f", ((actionComplete - actionStart) / 1000.0))); } catc...
codereview_java_data_7414
@Override public Comparator<? super T> getComparator() { - return null; } } return new SpliteratorProxy(original.spliterator()); The super impl Spliterator.getComparator() throws an IllegalStateException by default. Is it really necessary to retur...
codereview_java_data_7416
} private static TomlParseResult readToml(final String filepath) throws Exception { - TomlParseResult nodePermissioningToml; try { - nodePermissioningToml = TomlConfigFileParser.loadConfigurationFromFile(filepath); } catch (Exception e) { throw new Exception( "Unable to read pe...
codereview_java_data_7433
import java.util.concurrent.CompletableFuture; import com.google.common.annotations.VisibleForTesting; import org.apache.logging.log4j.Logger; public class DetermineCommonAncestorTask<C> extends AbstractEthTask<BlockHeader> { - private static final Logger LOG = getLogger(); private final EthContext ethContext; ...
codereview_java_data_7434
return log; } - if (checkApacheCommonsLoggingExists()) { log = new ApacheCommonsLogging(logTag); - } else if (checkAndroidLoggingMocked()) { - log = new AndroidLog(logTag); } else { - log = new ConsoleLog(logTag); } logMap...
codereview_java_data_7436
public static final String TYPE_RSS2 = "rss"; public static final String TYPE_ATOM1 = "atom"; public static final String PREFIX_LOCAL_FOLDER = "antennapod_local:"; - public static final String SUPPORT_INTERNAL_SPLIT = "\n"; - public static final String SUPPORT_INTERNAL_EQUAL = "\t"; public sta...
codereview_java_data_7447
* to determine whether the accumulator is now "empty" (i.e., equal to a * fresh instance), which signals that the current window contains no more * items with the associated grouping key and the entry must be removed - * from the results. I.e.: * <pre> * acc = create(); * ...
codereview_java_data_7453
*/ public Schema findSchema(String schemaName) { if (schemaName == null) { - throw DbException.get(ErrorCode.SCHEMA_NOT_FOUND_1, schemaName); } Schema schema = schemas.get(schemaName); if (schema == infoSchema) { This method returns `null` for unknown schemes, ...
codereview_java_data_7454
/** - * Iterator that walks through ModuleDefinitions in deployment order, that is, from downstream (sink, if present) - * to upstream (source) module. * Also prevents mutation of its backing data structure. */ public class DeploymentOrderIterator implements Iterator<ModuleDefinition> { should this be stat...
codereview_java_data_7459
} /** - * Shortcut for {@code filterTry(predicate::test, throwableSupplier)}, see {@link #filterTry(CheckedPredicate)}}. * * @param predicate A predicate * @return a {@code Try} instance should rather be ``` Java Objects.requireNonNull(throwableSupplier, "throwableSupplier is null"); ``...
codereview_java_data_7463
*/ @Nonnull public SinkBuilder<W, T> preferredLocalParallelism(int preferredLocalParallelism) { - checkPositive(preferredLocalParallelism, "Preferred local parallelism should be a positive number"); this.preferredLocalParallelism = preferredLocalParallelism; return this; } ...
codereview_java_data_7472
/** * Position2Accessor and Position3Accessor here is an optimization. For a nested schema like: - * * root * |-- a: struct (nullable = false) * | |-- b: struct (nullable = false) * | | -- c: string (containsNull = false) - * * Then we will use Position3Accessor to access nested field 'c'. It...
codereview_java_data_7484
public void beforeStory(Story story, boolean givenStory) { String name = bddRunContext.getRunningStory().getName(); - if (!configuration.dryRun() && !givenStory && !"BeforeStories".equals(name) && !"AfterStories".equals(name) - && (proxyEnabled || isProxyEnabledInStoryMeta())) ...
codereview_java_data_7485
import java.util.Properties; import java.util.concurrent.TimeUnit; -import static com.alibaba.nacos.test.naming.NamingBase.TEST_IP_4_DOM_1; -import static com.alibaba.nacos.test.naming.NamingBase.TEST_NEW_CLUSTER_4_DOM_1; -import static com.alibaba.nacos.test.naming.NamingBase.TEST_PORT; - /** * Created by wangton...
codereview_java_data_7486
* @return map that contains accessToken , null if acessToken is empty. */ protected Map<String, String> getSecurityHeaders() { - String accessToken = (String) this.securityProxy.getLoginIdentityContext().getParameter(Constants.ACCESS_TOKEN); - if (StringUtils.isBlank(accessToken)) { ...
codereview_java_data_7488
} } while (batch != null && batch.size() == 0); return batch == null ? Collections.emptyList() : batch; } Is it possible to consume all the threads in the pool while waiting for ThriftScanner to close? Like if I were to call close in a loop. } } while (batch != null && batch.size() == ...
codereview_java_data_7492
* Generate initial json for the root tablet metadata. */ public static byte[] getInitialJson(String dirName, String file) { - Preconditions.checkArgument(!dirName.contains("/"), "Invalid dir name %s", dirName); Mutation mutation = RootTable.EXTENT.getPrevRowUpdateMutation(); ServerColumnFamily.D...
codereview_java_data_7494
} catch (final NotAuthorizedException nae) { clearCachedTokens(); throw new CognitoNotAuthorizedException("User is not authenticated", nae); - } catch (final Exception e) { clearCachedTokens(); throw new ...
codereview_java_data_7503
protected TransactionPoolConfiguration transactionPoolConfiguration; protected BigInteger networkId; protected MiningParameters miningParameters; - protected MetricsSystem metricsSystem; protected PrivacyParameters privacyParameters; protected Path dataDirectory; protected Clock clock; Instead of a ...
codereview_java_data_7511
return WORKER_POOL; } - /** - * Return parallelism for "worker" thread-pool. - * In default, we submit 2 tasks per worker at a time. - * @return the parallelism of the worker pool. - */ - public static int getPoolParallelism() { - return WORKER_THREAD_POOL_SIZE * 2; - } - private static int get...
codereview_java_data_7512
JID userJid = new JID(user); if (XMPPServer.getInstance().isLocal(userJid)) { String username = userJid.getNode(); - synchronized (username.intern()) { groupMetaCache.remove(username); ...
codereview_java_data_7517
if (intent.resolveActivity(packageManager)!= null) { startActivity(intent); - Toast.makeText(getContext(), R.string.set_location_mode_high_accuracy, Toast.LENGTH_LONG).show(); } else { Toast.makeText(getContext(), R.string.cannot_open_location_settings, Toast.LENGT...
codereview_java_data_7520
@SuppressWarnings("unchecked") static <T> Bucket<T> get(Type type, int numBuckets) { Preconditions.checkArgument(numBuckets > 0, - "The number of bucket must larger than zero,but is %s", numBuckets); switch (type.typeId()) { case DATE: nits: Missing a space after the comma number of bucke...
codereview_java_data_7531
* for use it chooses a new tablet directory. */ public static TabletFiles updateTabletVolumes(AccumuloServerContext context, ZooLock zooLock, - VolumeManager vm, KeyExtent extent, TabletFiles tabletFiles, boolean replicate, - List<Pair<Path,Path>> replacements) throws IOException { log.trace("...
codereview_java_data_7549
// Node whitelist errors NODE_WHITELIST_NOT_SET(-32000, "Node whitelist has not been set"), - NODE_WHITELIST_DUPLICATED_ENTRY(-32000, "Request cannot contain duplicated node entries"), - NODE_WHITELIST_EXISTING_ENTRY(-32000, "Node whitelist cannot contain duplicated node entries"), NODE_WHITELIST_MISSING_ENT...
codereview_java_data_7554
int port = getPort(); try { - if (isSecure()) { - return new URI("https", null, host, port, null, null, null); - } else { - return new URI("http", null, host, port, null, null, null); - } } catch (URISyntaxException e) { throw new ConfigException("Cannot determine exte...
codereview_java_data_7556
// Handle item selection switch (item.getItemId()) { case R.id.action_display_list: - if(!opened){ bottomSheetBehaviorForDetails.setState(BottomSheetBehavior.STATE_HIDDEN); bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPA...
codereview_java_data_7569
@Deprecated public static void setConnectorInfo(JobConf job, String principal, AuthenticationToken token) throws AccumuloSecurityException { - if (token instanceof KerberosToken) { - log.info("Received KerberosToken, attempting to fetch DelegationToken"); - try { - Connector conn = Conn...
codereview_java_data_7571
Map<String, Object> aclAccessConfigMap = AclUtils.getYamlDataObject(fileHome + File.separator + fileName, Map.class); if (aclAccessConfigMap == null || aclAccessConfigMap.isEmpty()) { - throw new AclException(String.format("%s file not found or empty", fileHome + File.separator...
codereview_java_data_7575
*/ public boolean contains(TokenRange that) { // Empty ranges never contain any other range - if (this.isEmpty() || that.isEmpty()) return false; - return this.contains(that.start, true) - && this.contains(that.end, false); } /** This doesn't work...
codereview_java_data_7576
private final NacosRestTemplate nacosRestTemplate; - private volatile LoginIdentityContext loginIdentityContext; - public HttpLoginProcessor(NacosRestTemplate nacosRestTemplate) { this.nacosRestTemplate = nacosRestTemplate; } @Override - public Boolean getResponse(Properties prope...
codereview_java_data_7584
// If the deployer implementation handles the deployment request synchronously, log warning message if // any exception is thrown out of the deployment and proceed to the next deployment. catch (Exception e) { - loggger.warn(String.format("Exception when deploying the app %s:%s", currentModule, e.getMess...
codereview_java_data_7588
POLICY, SERVICE, ENTITY, - USER } private String domainName; Not sure if this is the right object since we don't manage USERs. When we manage users, it's typically to delete members from roles/groups, etc. So I don't expect any notifications where a user object was modifie...
codereview_java_data_7590
return; } - handleNewPartitions(topicIndex, newPartitionCount); } nextMetadataCheck = System.nanoTime() + METADATA_CHECK_INTERVAL_NANOS; } - private void handleNewPartitions(int topicIndex, int newPartitionCount) { String topicName = topics.get...
codereview_java_data_7600
/* - * Copyright 2019-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. please put some message here so that users can understand the error /* + * Copyright 2019-2022 the original author o...
codereview_java_data_7608
import org.junit.Test; import software.amazon.awssdk.core.internal.batchutilities.BatchAndSendFunction; import software.amazon.awssdk.core.internal.batchutilities.BatchManager; import software.amazon.awssdk.core.internal.batchutilities.BatchResponseMapperFunction; import software.amazon.awssdk.core.internal.batchu...
codereview_java_data_7617
package net.sourceforge.pmd.lang.java.ast; /** - * Marker interface for type body declarations. * * @author Clément Fournier */ Maybe add short example list: .... type body declarations, such as AnnotationMembers, Methods, Fields package net.sourceforge.pmd.lang.java.ast; /** + * Marker interface for type b...
codereview_java_data_7623
"task schedule create --name \"%s\" --definitionName \"%s\" --expression \"%s\" --properties \"%s\" --arguments \"%s\"", name, definition, expression, properties, args); CommandResult cr = dataFlowShell.executeCommand(wholeCommand); - verify(schedule).schedule(name, definition, Collections.singletonMap("s...
codereview_java_data_7624
accessTokenResponseClient.ifPresent(client -> this.accessTokenResponseClient = client); } } - - @Configuration(proxyBeanMethods = false) - static class OAuth2ClientRegistrationsConfiguration { - - @Autowired - @Qualifier(OAuth2ClientBeanNames.REST_OPERATIONS) - void configure(RestOperations restOperations) ...
codereview_java_data_7628
private RandomUtil() { } - private static final Random NEGATIVE_VALUES = new Random(); - - private static boolean negate() { - return NEGATIVE_VALUES.nextInt(2) == 1; } @SuppressWarnings("RandomModInteger") All tests need to use the `Random` that is passed in so that the values that are generated are ...
codereview_java_data_7633
InputConfigurator.setConnectionInfo(CLASS, job, inputInfo); } protected static ConnectionInfo getConnectionInfo(JobConf job) { return InputConfigurator.getConnectionInfo(CLASS, job); } if its protected, then its in public API and should have a since tag InputConfigurator.setConnectionInfo(CLAS...
codereview_java_data_7635
import android.util.Log; import de.danoeh.antennapod.core.ClientConfig; import de.danoeh.antennapod.core.preferences.UserPreferences; -import de.danoeh.antennapod.core.storage.DBTasks; @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) public class FeedUpdateJobService extends JobService { This `JobScheduler` versi...
codereview_java_data_7646
viewBinding.subscribeButton.setEnabled(true); viewBinding.subscribeButton.setText(R.string.subscribe_label); if (UserPreferences.isEnableAutodownload()) { - LinearLayout.LayoutParams layoutParams - = (LinearLayout.LayoutPar...
codereview_java_data_7657
: OptionalLong.empty(); } - public static BigInteger getBigInteger(final JsonObject jsonObject, final String key) { final Number value = (Number) jsonObject.getMap().get(key); if (value == null) { return null; `Optional<BigInteger>` for consistency with the other method in this class ...
codereview_java_data_7664
-/** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ -/* Generated By:JJTree: Do not edit this line. ASTAttribute.java */ package net.sourceforge.pmd.lang.jsp.ast; public class ASTAttribute extends AbstractJspNode { private String name; * We need to deprecate/internalize fi...
codereview_java_data_7667
if (LaunchIntent != null) { startActivity(LaunchIntent); }else{ - Toast.makeText(this, "App Disabled", Toast.LENGTH_SHORT).show(); } ...
codereview_java_data_7668
backupLevel += start ? 1 : -1; } - public synchronized void setMaxMemory(int size) { cache.setMaxMemory(size); } can that method have more specific name like "setMaxCacheMemory" backupLevel += start ? 1 : -1; } + public synchronized void setMaxCacheMemory(int size) { ...
codereview_java_data_7674
if (registrationId == null) { return null; } - String[] params = new String[0]; - if (registrationId.contains("?")) { - String[] explodedURI = registrationId.split("\\?"); - registrationId = registrationId.split("\\?")[0]; - params = explodedURI[1].split("&"); - } ClientRegistration clientRegistra...
codereview_java_data_7684
public void showDuplicatePicturePopup() { String uploadTitleFormat = getString(R.string.upload_title_duplicate); DialogUtil.showAlertDialog(getActivity(), - getString(R.string.warning), String.format(Locale.getDefault(), uploadTitleFormat, ...