id stringlengths 23 26 | content stringlengths 182 2.49k |
|---|---|
codereview_java_data_2433 | asList("--miner-coinbase", "--min-gas-price", "--miner-extra-data"));
// Check that fast sync options are able to work or send an error
- checkFastSyncOptions();
//noinspection ConstantConditions
if (isMiningEnabled && coinbase == null) {
for the static imports
asList("--miner-co... |
codereview_java_data_2437 | }
@Override
- public double getReservoirLevel() { return -1; }
public String getBaseBasalRateString() {
final DecimalFormat df = new DecimalFormat("#.##");
You can look at the `getJSONStatus` method of each pump to see what can be reported, there (line 761), you'll see that the Insight store... |
codereview_java_data_2442 | if (numMissingInstances > 0) {
schedule(numMissingInstances, matchingTaskIds, request, state, deployStatistics, pendingRequest, maybePendingDeploy);
-
- List<SingularityTaskId> remainingActiveTasks = new ArrayList<>(matchingTaskIds);
- if (requestManager.getExpiringBounce(request.getId()).isPresen... |
codereview_java_data_2443 | }
- // Returns a collection that returns the latest five posts from the Redshift table.
public String getPosts(String lang, int num) {
try {
returns the last 5, 10, or all posts
}
+ // Returns a collection that returns 5, 10, or all posts from the Redshift table.
public String getPo... |
codereview_java_data_2456 | }
List<SingularityMesosArtifact> combinedArtifacts = task.getDeploy().getUris().or(Collections.<SingularityMesosArtifact> emptyList());
- combinedArtifacts.addAll(task.getPendingTask().getExtraArtifacts().or(Collections.<SingularityMesosArtifact> emptyList()));
for (SingularityMesosArtifact artifact :... |
codereview_java_data_2468 | * @return a function that applies arguments to the given {@code partialFunction} and returns {@code Some(result)}
* if the function is defined for the given arguments, and {@code None} otherwise.
*/
static <R> Function0<Option<R>> lift(CheckedFunction0<? extends R> partialFunction) {
- ... |
codereview_java_data_2472 | import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Supplier;
import static com.hazelcast.spi.properties.GroupProperty.SHUTDOWNHOOK_POLICY;
import static java.util.concurrent.TimeUnit.SECONDS;
can we move this `GroupProperty` ?
import java.util.concurrent.atomic.AtomicInteger;
import jav... |
codereview_java_data_2474 | } else {//Or use the original unedited pictures
newFilePath = data.getStringExtra(EditImageActivity.FILE_PATH);
- ;
}
//System.out.println("newFilePath---->" + newFilePath);
//File file = new File(newFilePath);
Why is an extra semicolon placed here? Also, try... |
codereview_java_data_2475 | final Collection<ValidatorPeer> peers,
final Block blockToPropose) {
- final List<SignedData<RoundChangePayload>> roundChangePayloads = Lists.newArrayList();
- for (final ValidatorPeer peer : peers) {
- roundChangePayloads.add(
- peer.getMessageFactory().createSignedRoundChangePayload(... |
codereview_java_data_2486 | BROADCAST,
/**
* This policy sends each item to a single processor on each of the
- * cluster members. It is only available on a distributed edge.
*/
FANOUT
}
This doesn't state which processor on each member. The PR mentions "round robin" so I guess it's a d... |
codereview_java_data_2491 | @Override
public void setJsonParameters(Map<String, Object> allParameters) throws Exception {
Map<String, Object> parameters = (Map<String, Object>)allParameters.get("parameters");
- Long bitmask = (Long) parameters.get("type");
type = new ConnectionType(bitmask.intValue());
}
should use Number i... |
codereview_java_data_2511 | package com.getcapacitor;
import org.json.JSONException;
-import org.junit.Assert;
import org.junit.Test;
public class JSObjectTest {
@Test
This can be changed to `import static org.junit.Assert.*;` then all the `Assert.assertFoo(...)` can become `assertFoo(...)`
package com.getcapacitor;
import org.json.J... |
codereview_java_data_2520 | if (error != null) {
initFuture.completeExceptionally(error);
} else {
- notifyLifecycleListeners();
initFuture.complete(DefaultSession.this);
}
});
} catch (Throwable throwable)... |
codereview_java_data_2524 | Function<FileScanTask, Long> weightFunc = file -> Math.max(file.length(), openFileCost);
CloseableIterable<FileScanTask> splitFiles = splitFiles(splitSize);
- return CloseableIterable.transform(CloseableIterable.combine(
- new BinPacking.PackingIterable<>(splitFiles, splitSize, lookback, weightFunc,... |
codereview_java_data_2525 | private TableMetadata base;
private long expireOlderThan;
private int minNumSnapshots;
- private ExpireSnapshotResult expireSnapshotResult;
private Consumer<String> deleteFunc = defaultDelete;
private ExecutorService deleteExecutorService = DEFAULT_DELETE_EXECUTOR_SERVICE;
- public RemoveSnapshots(Tabl... |
codereview_java_data_2542 | private String cookieName = DEFAULT_CSRF_COOKIE_NAME;
- private Method setHttpOnlyMethod;
- private boolean cookieHttpOnly = true;
public CookieCsrfTokenRepository() {
this.setHttpOnlyMethod = ReflectionUtils.findMethod(Cookie.class, "setHttpOnly", boolean.class);
}
@Override
Just for understanding: Any rea... |
codereview_java_data_2549 | }
});
- AlertDialog dialog = builder.create();
- dialog.setCanceledOnTouchOutside(true);
- dialog.show();
}
private void handleDisconnectDevice(final long deviceId) {
why are you calling this?
}
});
+ builder.show();
}
private void handleDisconnectDevice(final long devi... |
codereview_java_data_2550 | import tech.pegasys.pantheon.services.pipeline.Pipeline;
import tech.pegasys.pantheon.services.pipeline.PipelineBuilder;
-import java.time.Duration;
import java.util.Optional;
public class FullSyncDownloadPipelineFactory<C> implements DownloadPipelineFactory {
Should this duration be stored as a constant somewhere... |
codereview_java_data_2556 | * @param startFileIndex A startFileIndex used to skip processed files.
* @param targetSizeInBytes Used to control the size of MicroBatch, the processed file bytes must be smaller than
* this size.
- * @param scanAllFiles Used to check where all the data file should be proce... |
codereview_java_data_2568 | /**
* Retrieves Software Version data. This method gives access to temporary Software Version data only.
- * @param key a <code>String</code> value of stored data ID.
- * @return a <code>Map<String,String></code> value of data .
*/
@Override
public Map<String, String> getSoftwareVers... |
codereview_java_data_2583 | }
@Override
- public void addTransactionFilterToTransactionValidators(
- final TransactionFilter transactionFilter) {
protocolSpecs.forEach(spec -> spec.getSpec().setTransactionFilter(transactionFilter));
}
}
Should be setTransactionFilter...
}
@Override
+ public void setTransactionFilter(... |
codereview_java_data_2590 | // This file is generated via a gradle task and should not be edited directly.
public final class PantheonInfo {
- private static final String clientIdentity = "pantheon";
- private static final String version =
- clientIdentity
+ "/v"
+ PantheonInfo.class.getPackage().getImplementationVe... |
codereview_java_data_2592 | return query(channel, queryString, Collections.emptyMap());
}
- private String fetchPeersTable() {
if (isSchemaV2) {
return "system.peers_v2";
}
Nit: I find the name a bit misleading, to me "fetch" implies that we retrieve it for somewhere (like a database query).
return query(channel, ... |
codereview_java_data_2595 | this.exportedSnapshotDetailsCache = instance.getMap(EXPORTED_SNAPSHOTS_DETAIL_CACHE);
}
- public static String keyPrefixForChunkedMap(String jobId, String fileId) {
- return jobId + ':' + fileId;
- }
-
// for tests
void setResourcesExpirationMillis(long resourcesExpirationMillis) {
... |
codereview_java_data_2603 | final TransactionPool transactionPool = pantheonController.getTransactionPool();
final MiningCoordinator miningCoordinator = pantheonController.getMiningCoordinator();
- AccountWhitelistController accountWhitelistController =
- new AccountWhitelistController(permissioningConfiguration);
-
- trans... |
codereview_java_data_2609 | @Bean
public ResourceLoader resourceLoader() {
MavenProperties mavenProperties = new MavenProperties();
- mavenProperties.setRemoteRepositories(new HashMap<>(Collections.singletonMap("mavenCentral",
new MavenProperties.RemoteRepository("https://repo.spring.io/libs-snapshot"))));
return new MavenResource... |
codereview_java_data_2610 | package net.sourceforge.pmd.lang.java.rule.errorprone;
-import net.sourceforge.pmd.lang.java.ast.ASTCompilationUnit;
import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration;
import net.sourceforge.pmd.lang.java.rule.AbstractJUnitRule;
If using the protected fields from the base class, you don't need to search... |
codereview_java_data_2614 | "com.palantir.baseline:baseline-error-prone:" + version);
project.getDependencies().add(
"refasterCompiler",
- "com.palantir.baseline:baseline-refaster-plugin:" + version);
- Provider<RegularFile> refasterRulesFile = project.getLayout(... |
codereview_java_data_2641 | return false;
}
- private boolean isWithSecurityEnforced(final AbstractApexNode<?> node){
- if(node instanceof ASTSoqlExpression){
String pattern = "(?i).*[^']\\s*WITH SECURITY_ENFORCED\\s*[^']*";
String query = ((ASTSoqlExpression) node).getQuery();
return... |
codereview_java_data_2651 | int levelWarning = SP.getInt(R.string.key_reservoirview_levelwarning, 80);
int levelCritical = SP.getInt(R.string.key_reservoirview_levelcritical, 5);
reservoirView.setText(reservoirLevel + " " + MainApp.sResources.getString(R.string.insulin_unit_shortname));
- ... |
codereview_java_data_2652 | throw validator.newValidationError(aggCall, RESOURCE.overNonAggregate());
}
final SqlNode window = call.operand(1);
- SqlLiteral qualifier = aggCall.getFunctionQuantifier();
- if (qualifier != null && qualifier.getValue() == SqlSelectKeyword.DISTINCT
- && window.getKind() == SqlKind.WINDOW... |
codereview_java_data_2658 | @Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_VOLUME_UP || keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
- handleSilenceRinger();
- return true;
}
return super.onKeyDown(keyCode, event);
}
This looks like it will silence the ringer when... |
codereview_java_data_2670 | * System.out.println(Option.of(1).transform(f));
*
* // Prints "3-transformed"
- * System.out.println(Option.none().transform(f));
* }</pre>
*
* @param f A transformation
This example does not compile. I got error: ``` jshell> System.out.println(Option.none().transform(f)); | ... |
codereview_java_data_2677 | private static final int LOCATION_REQUEST = 1;
private static final String MAP_LAST_USED_PREFERENCE = "mapLastUsed";
- private boolean LOCATION_CHANGED=false;
@BindView(R.id.progressBar)
ProgressBar progressBar;
please refer to google style guide for private variable naming conventions. :)
... |
codereview_java_data_2681 | *
* @param sql the SQL statement
* @param autoGeneratedKeys
- * {@link Statement.RETURN_GENERATED_KEYS} if generated keys should
- * be available for retrieval, {@link Statement.NO_GENERATED_KEYS} if
* generated keys should not be available
* @retur... |
codereview_java_data_2685 | return save(request, RequestState.ACTIVE, historyType, timestamp, user, message);
}
- public SingularityCreateResult deleting(SingularityRequest request, RequestHistoryType historyType, long timestamp, Optional<String> user, Optional<String> message) {
return save(request, RequestState.DELETING, historyTy... |
codereview_java_data_2688 | this.bootNodes = ethNetworkConfig.bootNodes;
}
- public Builder() {}
-
public Builder setGenesisConfig(final String genesisConfig) {
this.genesisConfig = genesisConfig;
return this;
This appears to be unused.
this.bootNodes = ethNetworkConfig.bootNodes;
}
public Buil... |
codereview_java_data_2689 | import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
public class SingularityTokenResponse {
private final String token;
private final SingularityUser user;
Just OOC, why does hashCode need overriding?
import com.fasterxml.jackson.annotation.JsonCreator;... |
codereview_java_data_2690 | * A snack bar which has an action button which on click dismisses the snackbar and invokes the
* listener passed
*/
- public static void showSnackBar(View view,
- int messageResourceId,
- int actionButtonResourceId,
- ... |
codereview_java_data_2691 | private void writeStandaloneAction(StringBuilder flex, TerminalLike key) {
flex.append(" {\n" +
" int kind = ").append(tokens.get(key)._1()+1).append(";\n" +
- " *((char **)yylval ) = malloc(strlen(yytext) + 1);\n" +
" strcpy(*((char **)yylval), yytext);\n" +
... |
codereview_java_data_2700 | private String diskUtil() {
double physicRatio = 100;
String storePath = this.brokerController.getMessageStoreConfig().getStorePathCommitLog();
- if (storePath.contains(MessageStoreConfig.MULTI_PATH_SPLITTER)) {
- String[] paths = storePath.trim().split(MessageStoreConfig.MULTI_... |
codereview_java_data_2707 | * @param token token
*/
public void validateToken(String token) {
- makeSureSecretKeyBytes();
Jwts.parserBuilder().setSigningKey(authConfigs.getSecretKeyBytes()).build().parseClaimsJws(token);
}
- private void makeSureSecretKeyBytes() {
- if (authConfigs.getSecretKeyBytes... |
codereview_java_data_2720 | }
}
- public static final Type DEFAULT_CONNECTION_CHECK_TYPE = Type.WIFI_ONLY;
Type connectionCheckType = DEFAULT_CONNECTION_CHECK_TYPE;
The default connection should be all inline with what is present today i.e ANY
}
}
+ public static final Type DEFAULT_CONNECTION_CHECK_TYPE = ... |
codereview_java_data_2721 | @Override
public void onConfigurationChanged(@NonNull final Configuration newConfig) {
super.onConfigurationChanged(newConfig);
- ViewGroup.LayoutParams rlBottomSheetLayoutParams=rlBottomSheet.getLayoutParams();
rlBottomSheetLayoutParams.height = getActivity().getWindowManager().getDe... |
codereview_java_data_2724 | "--output", koreOutputFile.getAbsolutePath()));
if (depth.isPresent()) {
args.add("--depth");
- args.add(depth.toString());
}
if (smtOptions.smtPrelude != null) {
args.add("--smt-prel... |
codereview_java_data_2725 | private <X> Iterator<X> chooseIterator(K from, K to, boolean forEntries) {
switch (transaction.isolationLevel) {
case READ_UNCOMMITTED:
- return new UncommittedIterator<>(this, from, to, false, forEntries);
case REPEATABLE_READ:
case SERIALIZABLE:
... |
codereview_java_data_2737 | } catch (FileNotFoundException e) {
//ignored
} catch (IOException | ClassNotFoundException e) {
- kem.registerInternalWarning("Invalidating serialized cache due to corruption.", e);
} catch (InterruptedException e) {
throw KEMException.criticalError("Inte... |
codereview_java_data_2742 | if (!isSlaveAttributesMatch(offerHolder, taskRequest, isPreemptibleTask)) {
return SlaveMatchState.SLAVE_ATTRIBUTES_DO_NOT_MATCH;
} else if (!areSlaveAttributeMinimumsFeasible(offerHolder, taskRequest, activeTaskIdsForRequest)) {
- return SlaveMatchState.SLAVE_ATTRIBUTES_DO_NOT_MATCH; // TODO: oth... |
codereview_java_data_2747 | }
public TabletIteratorEnvironment(ServerContext context, IteratorScope scope, boolean fullMajC,
- MajorCompactionReason reason) {
if (scope != IteratorScope.majc)
throw new IllegalArgumentException(
"Tried to set maj compaction type when scope was " + scope);
Will this just throw an ... |
codereview_java_data_2763 | }
descriptions = uploadItem.getDescriptions();
- compositeDisposable
- .add(downSampleImage(uploadItem.getContentUri())
- .subscribeOn(Schedulers.io())
- .observeOn(AndroidSchedulers.mainThread())
- .subscribe(bitmap -> {
- ... |
codereview_java_data_2764 | iconId = R.drawable.ic_notification_sync_error;
intent = ClientConfig.downloadServiceCallbacks.getReportNotificationContentIntent(context);
id = R.id.notification_download_report;
- content = context.getResources().getQuantityString(R.plurals.download_re... |
codereview_java_data_2765 | import com.intellij.lang.annotation.Annotation;
import com.intellij.lang.annotation.Annotator;
import com.intellij.psi.PsiElement;
import com.intellij.testFramework.fixtures.CodeInsightTestUtil;
/**
Great that you figured out a better, more robust replacement for the future.
import com.intellij.lang.annotation.... |
codereview_java_data_2766 | @Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
- addPreferencesFromResource(R.xml.preferences_notification);
setUpScreen();
}
Please rename the xml file to `preferences_notifications` (plural). I think that reads a bit better. The Java class name i... |
codereview_java_data_2771 | @Override
public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
Object[] arguments = invocationOnMock.getArguments();
- resultCollector.append(arguments[0]);
return null;
}
- }).when(dlqLogger).info(anySt... |
codereview_java_data_2772 | block.rewind();
// Fixbug - An IllegalStateException that wraps EOFException is thrown when partial writes happens
//in the case of power off or file system issues.
- // So we should first check the read length of block, and skip the broken block at end... |
codereview_java_data_2777 | @Subscribe
public void onStatusEvent(final EventTempTargetChange ev) {
- new Thread(() -> LoopPlugin.getPlugin().invoke("EventTempTargetChange", true)).start();
FabricPrivacy.getInstance().logCustom(new CustomEvent("TT_Loop_Run"));
}
Minor style point: _LoopPlugin.getPlugin()_ is redunda... |
codereview_java_data_2781 | import javax.annotation.Nullable;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import static com.hazelcast.jet.impl.util.Util.uncheckCall;
/**
* Private API, use {@link SourceProcessors#readJdbcP}.
this can throw exception, which must be caught
import javax.annotation.Nul... |
codereview_java_data_2785 | };
}
@Override public <M extends Metadata> Multimap<Method, MetadataHandler<M>> handlers(
MetadataDef<M> def) {
return ImmutableMultimap.of();
This method needs a deprecation annotation.
};
}
+ @Deprecated
@Override public <M extends Metadata> Multimap<Method, MetadataHandler<M>> ha... |
codereview_java_data_2786 | if (m.find()) {
retval = SafeParse.stringToInt(m.group(1)) * 60 * 60 + SafeParse.stringToInt(m.group(2)) * 60;
- if (m.group(3).equals(" AM") && m.group(1).equals("12"))
retval -= 12 * 60 * 60;
- if (m.group(3).equals(" PM") && !(m.group(1).equals("12")))
... |
codereview_java_data_2792 | assertTrue(attributes.getDkimTokens().size() == dkim.getDkimTokens().size());
List verifyDomainResultTokens = dkim.getDkimTokens();
- for (String token : attributes.getDkimTokens()) {
- assertTrue(verifyDomainResultTokens.contains(token));
- }
... |
codereview_java_data_2794 | }
@Override
- public void scaleApplicationInstances(String streamName, String appName, String count, Map<String, String> properties) {
// Skipper expects app names / labels not deployment ids
logger.info(String.format("Scale %s:%s to %s with properties: %s", streamName, appName, count, properties));
- this.s... |
codereview_java_data_2798 | JetPlanExecutor(
MappingCatalog catalog,
- JetInstance jetInstance,
Map<Long, JetQueryResultProducer> resultConsumerRegistry
) {
this.catalog = catalog;
- this.jetInstance = (AbstractJetInstance) jetInstance;
this.resultConsumerRegistry = resultCon... |
codereview_java_data_2801 | private View.OnLongClickListener photosOnLongClickListener = new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
- if(checkForReveal ==0) {
enterReveal();
- checkForReveal++;
}
Media m = (Media) v.fin... |
codereview_java_data_2802 | nextItemAt = System.nanoTime() + MILLISECONDS.toNanos(((Delay) item).millis);
pos++;
return false;
- } else if (item.equals(DONE_ITEM)) {
getLogger().info("returning true");
return true;
... |
codereview_java_data_2803 | *
* @since 2.3
*/
- List<AppDeploymentRequest> createRequests(String taskName, String dslText);
}
Can we make the name of this method more explicit by naming it as `createTaskDeploymentRequests` ?
*
* @since 2.3
*/
+ List<AppDeploymentRequest> createTaskDeploymentRequests(String taskName, String ds... |
codereview_java_data_2804 | SqlKind.OTHER_FUNCTION,
ReturnTypes.DATE_NULLABLE,
null,
- OperandTypes.STRING_STRING_DATETIME,
SqlFunctionCategory.TIMEDATE);
@LibraryOperator(libraries = {MYSQL, POSTGRESQL})
Then add a `Redshift` library ?
SqlKind.OTHER_FUNCTION,
ReturnT... |
codereview_java_data_2808 | if (numWaitingInInbox == 0 && rwinDiff < 0) {
rwinDiff = 0;
}
- receiveWindowCompressed += rwinDiff / 2;
- LoggingUtil.logFinest(logger, "receiveWindowCompressed=%d", receiveWindowCompressed);
}
return ackedSeqCompressed + receiveWindowC... |
codereview_java_data_2809 | String s = new String(b, StandardCharsets.UTF_8);
if (argument.equals("description/fetch")) {
- s = preparePmsSpec(s);
}
return s;
}
- private String preparePmsSpec(String pmsXml) {
- String result = pmsXml.replace("[uuid]", PMS.get().usn()); //.substring(0, PMS.get().usn().length()-2));
if (PMS.get... |
codereview_java_data_2824 | httpMethod.initEntity(requestHttpEntity.getBody(), headers.getValue(HttpHeaderConsts.CONTENT_TYPE));
}
HttpRequestBase requestBase = httpMethod.getRequestBase();
- getConfig(requestBase, requestHttpEntity.getHttpClientConfig());
return requestBase;
}
I think the meth... |
codereview_java_data_2827 | GROUP,
POLICY,
SERVICE,
- ENTITY,
- TEMPLATE
}
private String domainName;
Template is also not an object type so I don't expect to notify on templates. Instead when applying templates, we'll be updating roles/policies/services/groups.
GROUP,
POLIC... |
codereview_java_data_2836 | : null;
if (result == null && List.class.isAssignableFrom(method.getReturnType())) {
// Lists are generally deprecated, see #2451
- result = "";
}
return result;
}
```suggestion result = DeprecatedAttribute.NO_REPLACE... |
codereview_java_data_2839 | response.append(HTTPXMLHelper.SOAP_ENCODING_FOOTER);
response.append(CRLF);
} else {
- LOGGER.info("Unsupported action received: " + content);
}
} else if (method.equals("SUBSCRIBE")) {
output.headers().set("SID", PMS.get().usn());
```suggestion LOGGER.debug("Unsupported action received: " ... |
codereview_java_data_2840 | import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
-import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.text.Editable;
-import android.text.TextPaint;
import android.text.TextWatcher;
import andr... |
codereview_java_data_2847 | interface InputFormatOptions<T> {
/**
* Sets the {@link Authorizations} used to scan. Must be a subset of the user's authorizations.
- * By Default, auths are set to {@link Authorizations#EMPTY}
*
* @param auths
* the user's authorizations
This doesn't match the new client ... |
codereview_java_data_2857 | */
@Nonnull
public static <T> ProcessorMetaSupplier writeJmsQueueP(
@Nonnull SupplierEx<? extends Connection> newConnectionFn,
- @Nonnull BiFunctionEx<? super Session, ? super T, ? extends Message> messageFn,
- @Nonnull String name
) {
- return WriteJmsP.su... |
codereview_java_data_2865 | opt.setRequired(true);
options.addOption(opt);
- opt = new Option("i", "queue", true, "set the queue, eg: 0,1");
opt.setRequired(false);
options.addOption(opt);
why not use -q ? q is short name of queue, which is understandable
opt.setRequired(true);
option... |
codereview_java_data_2871 | release = this.skipperClient.install(installRequest);
}
catch (Exception e) {
- this.skipperClient.packageDelete(packageName);
throw new SkipperException(e.getMessage());
}
// TODO store releasename in deploymentIdRepository...
Should we try/catch packageDelete as well? Then it's a choice of logg... |
codereview_java_data_2873 | long recentPubDate = recentPubDates.containsKey(feed.getId()) ? recentPubDates.get(feed.getId()) : -1;
NavDrawerData.FeedDrawerItem drawerItem = new NavDrawerData.FeedDrawerItem(feed, feed.getId(),
feedCounters.get(feed.getId()), playedCounters.get(feed.getId()... |
codereview_java_data_2882 | void visit(LineComment n, A arg);
void visit(LongLiteralExpr n, A arg);
void visit(MarkerAnnotationExpr n, A arg);
would it make sense to order the methods by grouping related nodes? Like, all the literals near each other
void visit(LineComment n, A arg);
+ void visit(LocalClassDeclarationStmt ... |
codereview_java_data_2883 | public class ScanCommand extends Command {
private Option scanOptAuths, scanOptRow, scanOptColumns, disablePaginationOpt, showFewOpt,
- formatterOpt, interpreterOpt, formatterInterpeterOpt, outputFileOpt, scanOptCfOptions,
- scanOptColQualifier;
protected Option timestampOpt;
protected Option profil... |
codereview_java_data_2888 | int pairs = 0;
if (methodCount > 1) {
- for (int i = 0; i < methodCount; i++) {
for (int j = i + 1; j < methodCount; j++) {
String firstMethodName = methods.get(i);
String secondMethodName = methods.get(j);
That would compare in th... |
codereview_java_data_2889 | public class TestAncestorsOfProcedure extends SparkExtensionsTestBase {
- public TestAncestorsOfProcedure(
- String catalogName,
- String implementation,
- Map<String, String> config) {
super(catalogName, implementation, config);
}
nit: our style is to place this all on one line if it fits, an... |
codereview_java_data_2890 | codeEditorArea.richChanges()
.filter(t -> !t.getInserted().equals(t.getRemoved()))
- .successionEnds(Duration.ofMillis(100))
.subscribe(richChange -> parent.onRefreshASTClicked());
codeEditorArea.setParagraphGraphicFactory(LineNumberFactory.get(codeEdit... |
codereview_java_data_2892 | // snippet-sourcetype:[snippet]
// snippet-sourcedate:[2019-01-10]
// snippet-sourceauthor:[AWS]
-// snippet-start:[transcribe.java-streaming-client-behavior]
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
For parameter docs, I'd either say something more meaningful or remove them.
... |
codereview_java_data_2901 | .map(mod -> (Module) mod).collect(Collectors.toSet());
List<FlatModule> flatModules = kilModules.stream().map(this::toFlatModule).sorted(Comparator.comparing(FlatModule::name)).collect(Collectors.toList());
- scala.collection.Set<org.kframework.definition.Module> koreModules = FlatModul... |
codereview_java_data_2909 | }
@Test
- public void testExpiredAuthorizationRequestsRemoved() {
final Duration expiresIn = Duration.ofMinutes(2);
- this.authorizationRequestRepository.setOAuth2AuthorizationRequestExpiresIn(expiresIn);
this.authorizationRequestRepository.setClock(Clock.fixed(Instant.ofEpochMilli(0), ZoneId.systemDefault()... |
codereview_java_data_2911 | <h1>Error 503 Backend is unhealthy</h1>
<p>Backend is unhealthy</p>
<h3>Guru Mediation:</h3>
- <p>Details: cache-sea4454-SEA 1645538565 2107619846</p>
<hr>
<p>Varnish cache server</p>
</body>
I'm not yet sure if I like this form of testing. This method is complex enough that it's easy to... |
codereview_java_data_2917 | return candidates.stream().filter(s -> !s.isEmpty())
.map(cand -> computeMatchingSegments(cand, query, false))
.sorted(Comparator.<CompletionResult>naturalOrder().reversed())
- // second pass is done only on those we know we'll keep
... |
codereview_java_data_2924 | return getTaskJobExecutionsForList(jobExecutions);
}
@Override
public List<TaskJobExecution> listJobExecutionsWithStepCount(String queryString, Pageable pageable) {
Assert.notNull(pageable, "pageable must not be null");
We'll need a unit test for this method as well.
return getTaskJobExecutionsForList(... |
codereview_java_data_2925 | Future<?> compactTask = startCompactTask();
- try {
-
- assertTrue("compaction fate transaction exits", findFate(tableName));
-
- } catch (KeeperException ex) {
- String msg = "Failing test with possible transient zookeeper exception, no node";
- log.debug("{}", msg, ex);
- fail(msg);
- ... |
codereview_java_data_2927 | public class CdcJsonDataSerializerHook implements DataSerializerHook {
- public static final int ELEMENT = 1;
- public static final int EVENT = 2;
public static final int FACTORY_ID = FactoryIdHelper.getFactoryId(JET_CDC_JSON_DS_FACTORY, JET_CDC_JSON_DS_FACTORY_ID);
the names here don't seem aligned with t... |
codereview_java_data_2930 | int EXPECTED_AGGREGATE;
Integer[] ELEMENTS;
- int[] INT_ELEMENTS;
int[] RANDOMIZED_INDICES;
/* Only use this for non-mutating operations */
Once this is finished, I would be very interested in `>10m` - I can't run that on my laptop anymore :p
int EXPECTED_AGGREGATE;... |
codereview_java_data_2932 | @Override
public void write(InternalRow value, VectorizedRowBatch output) {
Preconditions.checkArgument(value != null, "value must not be null");
-
- int row = output.size;
- output.size += 1;
-
- writer.rootNonNullWrite(row, value, output);
}
@Override
Why does the value not allow to be null... |
codereview_java_data_2940 | binder.bind(MetricRegistry.class).toProvider(DropwizardMetricRegistryProvider.class).in(Scopes.SINGLETON);
binder.bind(AsyncHttpClient.class).to(SingularityAsyncHttpClient.class).in(Scopes.SINGLETON);
- binder.bind(OkHttpClient.class).in(Scopes.SINGLETON);
binder.bind(ServerProvider.class).in(Scopes.S... |
codereview_java_data_2945 | @Test
public void shouldHandleTransformOnNone() {
- // TODO: What is the expected behavior when transform is called on None given return type may or may not be an Option?
- // Calling None.get() will throw NoSuchElementException
- // Should it be left to the caller to decide how to handle... |
codereview_java_data_2946 | public Map<String, Object> getInputContext() {
return inputContext;
}
}
During the review I've realized that there is an implicit contract: if `decisionServiceName` is specified, only that decision service is evaluated, otherwise all the services are evaluated. I'm wondering if it's better to make ... |
codereview_java_data_2956 | }
// constructor
- public KeyValue(long offset, byte[] kafkaKey, byte[] value, Long timestamp) {
this.mOffset = offset;
this.mKafkaKey = kafkaKey;
this.mValue = value;
should this be 'long'?
}
// constructor
+ public KeyValue(long offset, byte[] kafkaKey, byte[] value, long timestamp) {
this.mOffs... |
codereview_java_data_2958 | .getExtensions()
.getByType(RecommendationProviderContainer.class);
- extension.setStrategy(RecommendationStrategies.OverrideTransitives); // default is 'ConflictResolved';
File rootVersionsPropsFile = rootVersionsPropsFile(project);
revert this semicolon change
... |
codereview_java_data_2970 | package tech.pegasys.pantheon.consensus.ibft.tests;
import static org.assertj.core.api.Assertions.assertThat;
Is this message correct? where or what is local node ...I don't see a field with that name
+/*
+ * Copyright 2019 ConsenSys AG.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you ma... |
codereview_java_data_2972 | downloadOrVerify("ext/lucene-queryparser-5.5.5.jar",
"org/apache/lucene", "lucene-queryparser", "5.5.5",
"6c965eb5838a2ba58b0de0fd860a420dcda11937", offline);
- downloadOrVerify("ext/lucene-queries-5.5.5.jar",
- "org/apache/lucene", "lucene-queries", "5.5... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.