id stringlengths 23 26 | content stringlengths 182 2.49k |
|---|---|
codereview_java_data_1230 | * necessarily be computed on any node of the type they support).
*
* <p>Metrics support a concept of {@linkplain MetricOption options},
- * which can be passed to {@link Metric#compute(Metric, MetricOptions, Node) compute}
* or {@link MetricsUtil#computeMetric(Metric, Node, MetricOptions)}.
*
* <p>Metric in... |
codereview_java_data_1237 | List<Variable> variables = new ArrayList<>();
Set<String> keys = new HashSet<>();
- variables.add(
- Variable
- .newBuilder()
- .setName("INHERIT_ENV_VARS")
- .setValue(Joiner.on(" ").join(inheritVariables))
- .build()
- );
-
taskInfo
.getExecutor()
.g... |
codereview_java_data_1245 | }
validateIdentityLinkArguments(identityId, type);
if (restApiInterceptor != null) {
- restApiInterceptor.deleteCaseInstanceIdentityLink(caseInstance, identityId, type);
}
- getIdentityLink(identityId, type, caseInstance.getId());
-
runtimeService.deleteUse... |
codereview_java_data_1246 | package org.flowable.engine.impl.webservice;
public class Operands {
Missing required license header
+/* Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org... |
codereview_java_data_1253 | }
public static PrometheusMeterRegistry getPrometheusMeterRegistry() {
return prometheusMeterRegistry;
}
Can you add a null check with an error like "PrometheusRegistryProvider must be initialised" or similar?
}
public static PrometheusMeterRegistry getPrometheusMeterRegistry() {
+ ... |
codereview_java_data_1254 | engineeringMode = engineeringModeSemaphore.exists() && engineeringModeSemaphore.isFile();
devBranch = BuildConfig.VERSION.contains("dev");
- if (!isDevModeOrRelease()) {
Notification n = new Notification(Notification.TOAST_ALARM, gs(R.string.closed_loop_disabled_on_dev_branch), Not... |
codereview_java_data_1255 | } catch (Exception e) {
log.warn("exception while doing multi-scan ", e);
addResult(e);
- } catch (Error t) {
- log.warn("Error while doing multi-scan ", t);
- addResult(t);
- throw t;
} finally {
Thread.currentThread().setName(oldThreadName);
runState.set(ScanRun... |
codereview_java_data_1258 | public class GenerateCoverage implements AutoCloseable {
private final boolean cover;
private final FileUtil files;
- private final PrintWriter allFiles;
public GenerateCoverage(boolean cover, FileUtil files) {
this.cover = cover;
this.files = files;
files.resolveKompiled("... |
codereview_java_data_1264 | private final Object executionLock = new Object();
private final ILogger logger;
private String jobName;
- private List<File> localFiles = new ArrayList<>();
// dest vertex id --> dest ordinal --> sender addr --> receiver tasklet
private Map<Integer, Map<Integer, Map<Address, ReceiverTasklet... |
codereview_java_data_1270 | filesMatch(Lists.newArrayList("C", "D", "E"), appendsBetweenScan(2, 5));
Assert.assertTrue(listener1.event().fromSnapshotId() == 2);
Assert.assertTrue(listener1.event().toSnapshotId() == 5);
}
@Test
I'm in favor of check all fields as it's the only test verifying IncrementalScanEvent, but others m... |
codereview_java_data_1272 | if (rule instanceof XPathRule || rule instanceof RuleReference && ((RuleReference) rule).getRule() instanceof XPathRule) {
lines.add("**This rule is defined by the following XPath expression:**");
- lines.add("```xpath");
line... |
codereview_java_data_1274 | logger.fine("processing ancestor " + ancestor.value());
}
DependencyLinkSpan ancestorLink = ancestor.value();
- if (ancestorLink != null &&
ancestorLink.kind == DependencyLinkSpan.Kind.SERVER) {
parent = ancestorLink.service;
break;
similarly her... |
codereview_java_data_1276 | private static PendingIntent createProgressStringIntent(Context context) {
Intent startingIntent = new Intent(context, MediaButtonReceiver.class);
startingIntent.setAction(MediaButtonReceiver.NOTIFY_PROGRESS_STRING_RECEIVER);
- startingIntent.putExtra(MediaButtonReceiver.DUMMY_VALUE,"DUMMY... |
codereview_java_data_1284 | public abstract class RestJobsService implements JobsService {
public static final String JOBS_PATH = "/jobs";
private URI jobsServiceUri;
Wouldn't it have more sense to thrown an exception in case jobServiceUrl is null? From my point of view it is not valid value and we should fail fast.
public abstract ... |
codereview_java_data_1300 | negate = true;
}
- String profileName = "";
- if (cl.hasOption(profileNameOpt.getOpt())) {
- profileName = cl.getOptionValue(profileNameOpt.getOpt());
- }
-
final Authorizations auths = getAuths(cl, shellState);
final BatchScanner scanner = shellState.getAccumuloClien... |
codereview_java_data_1303 | @Inject
public MailTemplateHelpers(SandboxManager sandboxManager, SingularityConfiguration singularityConfiguration) {
- taskDatePattern = singularityConfiguration.getDefaultDatePattern();
- timeZone = singularityConfiguration.getTimeZone();
this.uiBaseUrl = singularityConfiguration.getUiConfiguration(... |
codereview_java_data_1305 | .observeOn(AndroidSchedulers.mainThread())
.subscribe(this::populatePlaces,
throwable -> {
- if (throwable instanceof UnknownHostException || throwable instanceof ConnectException) {
- ... |
codereview_java_data_1308 | * If true, a default {@link OAuth2AuthorizedClient} can be discovered from the current Authentication. It is
* recommended to be cautious with this feature since all HTTP requests will receive the access token if it can be
* resolved from the current Authentication.
- *
* @param defaultOAuth2AuthorizedClie... |
codereview_java_data_1311 | runTimeConfiguration,
liveReload.isLiveReload());
- Map<String, byte[]> generatedClasses = new HashMap<>();
- generatedKogitoClasses.forEach(g -> generatedClasses.putAll(g.getGeneratedClasses()));
// Json schema files
- generatedFiles.addAll(generateJsonSc... |
codereview_java_data_1317 | /**
* Data Flow Stream property key prefix.
*/
- public static final String STREAM_PREFIX = PREFIX + "stream.";
/**
* Stream name property key.
any `PREFIX` vars that are only used here should be `private`
/**
* Data Flow Stream property key prefix.
*/
+ private static final String STREAM_PREFIX ... |
codereview_java_data_1323 | exceptions.add(line);
}
} catch (IOException ioe) {
- ioe.printStackTrace();
}
}
Could you change this printStackTrace please? We should just rethrow it as `throw new RuntimeException(ioe);` since if we get an error here, it doesn'... |
codereview_java_data_1327 | }
public static void main(String[] args) {
- System.setProperty("hazelcast.logging.type", "log4j");
JetInstance jet = Jet.newJetInstance();
Jet.newJetInstance();
new BatchCoGroup(jet).go();
The result looks like this: ``` result: 12->([PageVisit{3}, PageVisit{4}], [AddToCart... |
codereview_java_data_1329 | // possible race condition here, if table is renamed
String tableName = Tables.getTableName(context, tableId);
AccumuloConfiguration acuTableConf =
- new ConfigurationCopy(context.tableOperations().getPropertiesMap(tableName));
Configuration conf = context.getHadoopConf();
Do we still need t... |
codereview_java_data_1335 | import org.flowable.common.engine.impl.el.function.VariableLowerThanOrEqualsExpressionFunction;
import org.flowable.common.engine.impl.el.function.VariableNotEqualsExpressionFunction;
import org.flowable.common.engine.impl.history.HistoryLevel;
-import org.flowable.common.engine.impl.interceptor.*;
import org.flowa... |
codereview_java_data_1338 | Object timerMetric = metric.startTiming("getpendingdomainrolememberslist_timing", null, principalDomain);
logPrincipal(ctx);
validateRequest(ctx.request(), caller);
- Principal ctxPrincipal = ((RsrcCtxWrapper) ctx).principal();
if (LOG.isDebugEnabled()) {
- LOG.debu... |
codereview_java_data_1345 | @Nonnull
public static synchronized JetInstance getInstance() {
if (supplier == null) {
- supplier = memoizeConcurrent(JetBootstrap::createStandaloneInstance);
}
return supplier.get();
}
we may need to disable DiscoveryConfig too by setting an empty config `join.set... |
codereview_java_data_1349 | Object getParameter(String key);
/**
- * get config context
*
* @return configContext
*/
Capitalize the first letter
Object getParameter(String key);
/**
+ * Get config context
*
* @return configContext
*/ |
codereview_java_data_1351 | package org.flowable.editor.language.xml;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.AssertionsForClassTypes.tuple;
import org.flowable.bpmn.BpmnAutoLayout;
import org.flowable.bpmn.model.BpmnModel;
Please use only `Assertions`.
package org.flowable.editor.langu... |
codereview_java_data_1357 | }
@Override public boolean decode(byte[] span, Collection<Span> out) { // ex DependencyLinker
- Span result = decodeOne(ReadBuffer.wrap(span, 0));
if (result == null) return false;
out.add(result);
return true;
}
@Override public boolean decodeList(byte[] spans, Collection<... |
codereview_java_data_1366 | removedTasks.add(queue.remove().getData());
}
- assertThat(queue.getReadFileNumber()).isEqualTo(0);
// Check that all tasks were read correctly.
removedTasks.add(queue.remove().getData());
If the first file has been read and closed, shouldn't the readFile number increment to 1?? ```s... |
codereview_java_data_1378 | TableFilter filter = readSimpleTableFilter();
command.setTableFilter(filter);
command.setSetClauseList(readUpdateSetClause(filter));
- if (readIf(FROM)) {
- TableFilter fromTable = readTableFilter();
- command.setFromTableFilter(fromTable);
}
if (readI... |
codereview_java_data_1390 | throw new JobNotFoundException(jobId);
}
- DAG dag = deserializeDag(masterContext, jobRecord);
- Set<String> ownedObservables = ownedObservables(dag);
-
completeObservables(ownedObservables, error);
JobConfig config = jobRecord.getConfig();
deserializing the DAG is... |
codereview_java_data_1393 | }
}
- public long getLockTimeout() {
Setting setting = findSetting(
SetTypes.getTypeName(SetTypes.DEFAULT_LOCK_TIMEOUT));
return setting == null ? Constants.INITIAL_LOCK_TIMEOUT : setting.getIntValue();
why does this return long?
}
}
+ public int ge... |
codereview_java_data_1396 | Log.e("Surface","Change");
Camera.Parameters parameters = mCamera.getParameters();
int state = Camera2.getState();
- if(state == 1 ) { parameters.setFlashMode(Camera.Parameters.FLASH_MODE_OFF); }
- else if(state == 2) { parameters.setFlashMode(Camera.Parameters.FLASH_MODE_AUTO); }
- else { parameters.setFla... |
codereview_java_data_1402 | import com.alibaba.nacos.api.naming.pojo.Instance;
import com.alibaba.nacos.api.naming.pojo.ListView;
import com.alibaba.nacos.api.naming.pojo.ServiceInfo;
import java.util.List;
Why should the first letter be changed to lowercase?
import com.alibaba.nacos.api.naming.pojo.Instance;
import com.alibaba.nacos.api.... |
codereview_java_data_1414 | *
* @param <T> type of the emitted item
*/
- public interface SourceBuffer<T> extends Serializable {
/**
* Returns the number of items the buffer holds.
This doesn't need to be serializable.
*
* @param <T> type of the emitted item
*/
+ public interface Sour... |
codereview_java_data_1427 | /** Exception during XPath evaluation. */
public class XPathEvaluationException extends RuntimeException {
- XPathEvaluationException(Throwable cause) {
super(cause);
}
is package-private the intended visibility? or you just missed the access modifier?
/** Exception during XPath evaluation. */
pu... |
codereview_java_data_1433 | }
- public static JSONObject createJsonObject(String response){
- JSONObject jsonObject = null;
- try {
- jsonObject = new JSONObject(response);
- } catch (JSONException e) {
- e.printStackTrace();
- }
- return jsonObject;
- }
-
}
This looks more lik... |
codereview_java_data_1434 | import org.apache.spark.sql.types.DataTypes;
import org.junit.AfterClass;
import org.junit.Assert;
-import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
I don't think it is a good idea for tests to create `Timestamp` or `Date` objects because those representations ... |
codereview_java_data_1438 | if (file == null) {
writeMemoryToFile();
}
- return fileProviderInterface.getUriForProvidedFile(file, mimeType);
}
private void writeMemoryToFile() throws IOException {
This mixes two concepts. I think it's better if this class only knows about files. Constructing the co... |
codereview_java_data_1442 | DataFile copy();
/**
- * @return List of offsets for blocks of a file, if applicable, null otherwise.
* When available, this information is used for planning scan tasks whose boundaries
- * are determined by these offsets.It is important that the returned list is sorted
- * in ascending order.
*/
... |
codereview_java_data_1444 | // Only remove per request handler if the channel is registered
// or open since DefaultChannelPipeline would remove handlers if
// channel is closed and unregistered
- // See DefaultChannelPipeline.java#L1403
if (channel.isOpen() || channel.isRegistered())... |
codereview_java_data_1453 | return joinClause;
}
@SuppressWarnings("unchecked")
public <T, T1, R> DistributedBiFunction<?, ? super T1, ?> adaptHashJoinOutputFn(
@Nonnull DistributedBiFunction<? super T, ? super T1, ? extends R> mapToOutputFn
we could add `@Nonnull` to output values as well
return jo... |
codereview_java_data_1459 | TableUtils.createTableIfNotExists(connectionSource, ExtendedBolus.class);
TableUtils.createTableIfNotExists(connectionSource, CareportalEvent.class);
TableUtils.createTableIfNotExists(connectionSource, ProfileSwitch.class);
-// resetFood();
updateEarliestDa... |
codereview_java_data_1464 | try {
return classLoader.loadClass(mainClass);
} catch (ClassNotFoundException e) {
- System.err.println("Cannot load main class: " + mainClass);
throw e;
}
}
should say cannot find or load main class, I think?
try {
return cla... |
codereview_java_data_1481 | if (audioPlayer == null) {
return;
}
- audioPlayer.backToCover(true);
float condensedSlideOffset = Math.max(0.0f, Math.min(0.2f, slideOffset - 0.2f)) / 0.2f;
audioPlayer.getExternalPlayerHolder().setAlpha(1 - condensedSlideOffset);
Should ... |
codereview_java_data_1482 | import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.Authorization;
-import java.util.HashMap;
-import java.util.Map;
-
/**
* @author Frederik Heremans
*/
Project standards are to include all java packages first as was originally done in this file.
import io.swagger.annotations.ApiRespons... |
codereview_java_data_1498 | }
private Set<EnodeURL> loadStaticNodes() throws IOException {
- final String STATIC_NODES_FILENAME = "static-nodes.json";
- final Path staticNodesPath = dataDir().resolve(STATIC_NODES_FILENAME);
return StaticNodesParser.fromPath(staticNodesPath);
}
can this be made a constant
}
private Set<... |
codereview_java_data_1499 | */
@Override
public Value getTopValue() {
- String value =
- Integer.toString(yieldNexts.get()) + ',' + yieldSeeks.get() + ',' + rebuilds.get();
return new Value(value);
}
```suggestion yieldNexts.get() + "," + yieldSeeks.get() + "," + rebuilds.get(); ``` Could do this if we wanted to avoid... |
codereview_java_data_1513 | public boolean has(Part part) {
return annotations.containsKey(part);
}
-
- public Part findKeyForAnnotationWithReplacementPart(Part part) {
- for (HashMap.Entry<Part, CryptoResultAnnotation> entry : annotations.entrySet()) {
- if (part == entry.getValue().getReplacementData()) {... |
codereview_java_data_1527 | */
public static final int DOMAIN_NOT_FOUND_1 = 90120;
/**
* The error with code <code>90121</code> is thrown when
* a database operation is started while the virtual machine exits
when changing existing entries in this class, please provide backwards compat constants with the old names tha... |
codereview_java_data_1530 | Job job = jet.newJob(pipeline);
assertJobStatusEventually(job, RUNNING);
- // and connection is cut
MILLISECONDS.sleep(ThreadLocalRandom.current().nextInt(0, 500));
proxy.setConnectionCut(true);
// and some time passes
All tests in this class ... |
codereview_java_data_1532 | editText.setHint(text);
editText.setId(position);
editText.setKeyListener(keyListener);
editText.setImeOptions(EditorInfo.IME_ACTION_DONE);
editText.setSingleLine();
editText.setPadding(dpsToPixels(10), 0, dpsToPixels(10), 0);
I guess we won't be able to move to th... |
codereview_java_data_1545 | if (hash) {
String encodedKey = "";
try {
- byte[] encodedBytes = MessageDigest.getInstance(Constants.NON_CRYPTO_USE_HASH_ALGORITHM)
.digest(entry.getKey().getBytes(UTF_8));
encodedKey = new String(encodedBytes, UTF_8);
} catch (NoSuchAl... |
codereview_java_data_1546 | sessionManager.forceLogin(context);
return;
}
- contribution.setCreator(sessionManager.getRawUserName());
}
if (contribution.getDescription() == null) {
IMO it would be more appropriate to use something called `getAuthorName`. `getAuthorName` ... |
codereview_java_data_1553 | // We only need to check the validity of recent chunks for calling sync()
// after writeStoreHeader() in the method storeNow().
// @since 2019-08-09 little-pan
- final Chunk[] lastCandidates = new Chunk[SYNC_MAX_DIFF + 2/* last + new chunk(maybe write header failed)*/];
// fi... |
codereview_java_data_1555 | if (StringUtils.isBlank(type)) {
// simple judgment of file type based on suffix
if (configInfo.getDataId().contains(SPOT)) {
- String extName = configInfo.getDataId().substring(configInfo.getDataId().lastIndexOf(SPOT) + 1).toLowerCase();
... |
codereview_java_data_1556 | final Callback<ForgotPasswordResult> callback) {
final InternalCallback internalCallback = new InternalCallback<ForgotPasswordResult>(callback);
- internalCallback.async(_forgotPassword(username, internalCallback, null));
}
/**
Do we actually need clientMetadat... |
codereview_java_data_1560 | MockPacketDataFactory.mockNeighborsPacket(discoPeer, otherPeer, otherPeer2);
controller.onMessage(neighborsPacket, discoPeer);
- verify(controller, times(0)).bond(eq(otherPeer));
- verify(controller, times(1)).bond(eq(otherPeer2));
}
@Test
nit: I don't think we need the `eq` here. The default... |
codereview_java_data_1562 | }
public R startsWith(BoundReference<String> ref, Literal<String> lit) {
- return null;
}
public <T> R predicate(BoundPredicate<T> pred) {
I think this should throw an `UnsupportedOperationException`. The problem is that the all of the visitors were written without this method and we need to e... |
codereview_java_data_1563 | }
});
}
- if (LOG.isTraceEnabled()) {
- LOG.trace("Children nodes: {}", validChildren.size());
- validChildren.forEach(c -> LOG.trace("- {}", c));
- }
return validChildren;
}
This could also be simplified: ```suggestion LOG.trace("Children nodes (size: {}): {}", validChildr... |
codereview_java_data_1564 | package org.flowable.cmmn.test.runtime;
import static org.assertj.core.api.Assertions.assertThat;
@mkiener this file needs the license header added. Thanks.
+/* Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a c... |
codereview_java_data_1573 | */
public interface ScanExecutor {
- public interface Config {
/**
* @return the unique name used to identified executor in config
*/
public is redundant
*/
public interface ScanExecutor {
+ interface Config {
/**
* @return the unique name used to identified executor in config
... |
codereview_java_data_1598 | return "(" + _1 + ", " + _2 + ")";
}
- public static <T1, T2> Tuple2<Seq<T1>, Seq<T2>> sequence(Seq<Tuple2<T1, T2>> tuples) {
Objects.requireNonNull(tuples, "tuples is null");
- return new Tuple2<>(tuples.map(Tuple2::_1), tuples.map(Tuple2::_2));
}
}
\ No newline at end of file
Great... |
codereview_java_data_1607 | package org.apache.rocketmq.broker.grpc.adapter;
import io.grpc.stub.ServerCallStreamObserver;
public class InvocationContext<R, W> {
final private R request;
Should this constant value should be configurable?
package org.apache.rocketmq.broker.grpc.adapter;
import io.grpc.stub.ServerCallStreamObserver;
+im... |
codereview_java_data_1612 | nodeMetaModel.getTypeNameGenerified(),
nodeMetaModel.getTypeNameGenerified()
));
- this.addOrReplaceWhenSameSignature(nodeCoid, cloneMethod);
}
}
Whyyyy so many explicit this's? :-(
nodeMetaModel.getTypeNameGenerified(),
nodeMet... |
codereview_java_data_1619 | return tokenSignature;
}
- public String getCustomAuthorizerName() {
return customAuthorizerName;
}
- public String getCustomAuthorizerLamdbaArn() {
return customAuthorizerLambdaArn;
}
Sorry, dumb question maybe, is this visibility difference intentional?
retur... |
codereview_java_data_1634 | import fr.free.nrw.commons.location.LatLng;
public class Converters {
@TypeConverter
public static Date fromTimestamp(Long value) {
return value == null ? null : new Date(value);
``` /** * Gson objects are very heavy. The app should ideally be using just one instance of it instead of creating new ... |
codereview_java_data_1636 | return new GetClusterMetadataOperation();
case GET_JOB_METRICS_OP:
return new GetJobMetricsOperation();
- case GET_JOB_METRICS_FROM_MEMBER_OP:
- return new GetJobMetricsFromMemberOperation();
default:
... |
codereview_java_data_1645 | private final BiConsumer<? super A, ? super T> accumulateF;
private final Function<A, R> finishAccumulationF;
private final BinaryOperator<A> combineAccF;
- private final FlatMapper<Punctuation, Session<K, R>> expiredSesFlatmapper;
SessionWindowP(
long sessionTimeout,
expiredSession... |
codereview_java_data_1650 | * Returns a sink constructed directly from the given Core API processor
* meta-supplier.
* <p>
- * Default local parallelism for this source is specified by the given
* {@link ProcessorMetaSupplier#preferredLocalParallelism() metaSupplier}.
*
* @param sinkName user-friendly sink ... |
codereview_java_data_1651 | */
@Override
public Single<List<Label>> getLabels(Boolean refresh) {
- Long lastModifiedDate = UpdateSinceLastUpload("labels");
- if (lastModifiedDate > 1) {
// if (refresh || tableIsEmpty(labelDao)) {
return productApi.getLabels()
.map(LabelsWrapp... |
codereview_java_data_1659 | package org.apache.rocketmq.remoting.netty;
import io.netty.handler.ssl.ClientAuth;
import io.netty.handler.ssl.SslContext;
import io.netty.handler.ssl.SslContextBuilder;
import io.netty.handler.ssl.SslProvider;
what about using try-with-resources to deal with resource auto close
package org.apache.rocketmq.rem... |
codereview_java_data_1678 | @Override
public void init() {
if (serializationService.getManagedContext() != null) {
- Processor toInit = processor;
- if (processor instanceof ProcessorWrapper) {
- toInit = ((ProcessorWrapper) processor).getWrapped();
- }
Object initial... |
codereview_java_data_1681 | public static boolean isMultiStatement(String sql) {
- final int index = sql.indexOf(';');
- return index != -1 && index != sql.length() - 1;
}
// INSERT' ' | INSTALL ' '
whether to consider value of insert has ';'
public static boolean isMultiStatement(String sql) {
+ int in... |
codereview_java_data_1685 | + " tserver.walog.max.size >= this property."),
TSERV_MEM_MGMT("tserver.memory.manager", "org.apache.accumulo.server.tabletserver.LargestFirstMemoryManager", PropertyType.CLASSNAME,
"An implementation of MemoryManger that accumulo will use."),
- TSERV_SESSION_MAXIDLE("tserver.session.idle.max", "1... |
codereview_java_data_1695 | public void setCurrentGroupExprData(Expression expr, Object obj) {
Integer index = exprToIndexInGroupByData.get(expr);
if (index != null) {
- if (currentGroupByExprData[index] != null) {
- throw DbException.throwInternalError();
- }
currentGroupBy... |
codereview_java_data_1700 | }
/**
- * Set the job ID.
*/
public TestProcessorMetaSupplierContext setJobId(long jobId) {
this.jobId = jobId;
It should say "_Sets_ the job ID." Likewise in the methods below.
}
/**
+ * Sets the job ID.
*/
public TestProcessorMetaSupplierContext setJobId(lo... |
codereview_java_data_1704 | }
private SearchRow getSearchRow(SearchRow row, int columnId, Value v, boolean max) {
- Column column = columnId == SearchRow.ROWID_INDEX ?
- table.getRowIdColumn() :
- table.getColumn(columnId);
- int vType = v.getType();
- in... |
codereview_java_data_1707 | "\r\n" +
"dGhpcyBpcyBzb21lIG1vcmUgdGVzdCB0ZXh0Lg==\r\n"));
- checkAddresses(msg.getFrom(), "adam@example.org");
- checkAddresses(msg.getRecipients(RecipientType.TO), "eva@example.org");
- streamToString(MimeUtility.decodeBody(msg.getBody()));
}... |
codereview_java_data_1711 | }
public static String getSpcifyDelayOffsetStorePath(final String rootDir) {
- return rootDir + File.separator + "dragon" + File.separator + "delayOffset.json";
}
public static String getTranStateTableStorePath(final String rootDir) {
"dragon" here is a little confusing.
}
public ... |
codereview_java_data_1713 | * Returns a handler for manipulating the metric with the specified name.
*/
public static Metric metric(String name) {
- return MetricsImpl.metric(name, Unit.COUNT, false);
}
/**
I 'd rather have this as a separate method, than a flag. i.e. `Metric.threadSafeMetric()`
* Returns... |
codereview_java_data_1719 | this.valueDeserializer = valueDeserializer;
}
- public static StoredNodeFactory<BytesValue> create() {
- return new StoredNodeFactory<>(
- (h) -> Optional.empty(), Function.identity(), Function.identity());
- }
-
@Override
public Node<V> createExtension(final BytesValue path, final Node<V> chi... |
codereview_java_data_1724 | private static final String HIVE_ACQUIRE_LOCK_TIMEOUT_MS = "iceberg.hive.lock-timeout-ms";
private static final String HIVE_LOCK_CHECK_MIN_WAIT_MS = "iceberg.hive.lock-check-min-wait-ms";
private static final String HIVE_LOCK_CHECK_MAX_WAIT_MS = "iceberg.hive.lock-check-max-wait-ms";
- private static final St... |
codereview_java_data_1726 | if (result.isPresent()) {
Result toReturn = result.get();
- LOG.fine(String.format("Detected dialect: %s", toReturn.dialect));
return toReturn;
}
can we leave this one as info? One has the ability to set java log levels... although it seemingly is too complicated for many users. But those ... |
codereview_java_data_1729 | protected void onDraw(Canvas canvas)
{
if (GRID_ENABLED) {
- DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
- int screenWidth = metrics.widthPixels;
- int screenHeight = metrics.heightPixels;
canvas.drawLine(2 * (screenWidth / 3), 0, 2 * (screenWidth / 3), screenHeight, paint);
... |
codereview_java_data_1732 | jobRepository = new JobRepository(jetInstance);
jobExecutionService = new JobExecutionService(nodeEngine, taskletExecutionService, jobRepository);
jobCoordinationService = createJobCoordinationService();
- nodeEngine.getMetricsRegistry().registerDynamicMetricsProvider(jobCoordinationSe... |
codereview_java_data_1733 | private final Map<String, ClassLoaderEntry> dataEntries = new ConcurrentHashMap<>();
private final Map<String, ClassLoaderEntry> classEntries = new ConcurrentHashMap<>();
- public ResourceStore(Path rootDir, NodeEngineImpl nodeEngine) {
this.log = nodeEngine.getLogger(getClass());
this.st... |
codereview_java_data_1735 | import org.apache.accumulo.core.file.blockfile.cache.CacheEntry.Weighbable;
import org.apache.accumulo.core.file.blockfile.cache.impl.ClassSize;
import org.apache.accumulo.core.file.blockfile.cache.impl.SizeConstants;
-import org.apache.accumulo.core.file.blockfile.impl.CachableBlockFile;
import org.apache.accumulo... |
codereview_java_data_1738 | }
@Override
- public String getTimestamp(long tid) {
verifyReserved(tid);
try {
Consider returning an empty string (or N/A, or unavailable?) instead of throwing an exception? This is for information and continuing without this data point (especially if the exception was transient) may allow other oper... |
codereview_java_data_1742 | plugin.getInstance().checkPermissions(savedPermissionCall);
} else {
// handle permission requests by other methods on the plugin
- plugin.getInstance().onRequestPermissionsResult(savedPermissionCall, getPermissionStates(plugi... |
codereview_java_data_1757 | import net.pms.formats.Format;
import net.pms.formats.v2.SubtitleType;
import net.pms.image.ImageFormat;
-import net.pms.image.ImageInfo;
import net.pms.image.ImagesUtil;
import net.pms.image.ImagesUtil.ScaleType;
import net.pms.util.FileUtil;
This seems unused?
import net.pms.formats.Format;
import net.pms.f... |
codereview_java_data_1762 | public class Planner {
/**
- * Minimum frequency of watermarks. This is not technically necessary, but
- * improves debugging by avoiding too large gaps between WMs and the user
- * can better observe if input to WM coalescing is lagging.
*/
- private static final int MINIMUM_WATERMARK_RATE =... |
codereview_java_data_1765 | scope,
includeSystemVars);
} else {
- List<List<String>> customStarExpansion;
- if ((customStarExpansion = getCustomStarExpansion(p.right)) != null) {
for (List<String> names : customStarExpansion) {
SqlIdentifier exp = new SqlIdenti... |
codereview_java_data_1769 | // make sure the child is big enough
cv.child.ensureSize(cv.childCount, true);
// Add each element
- for (long e = 0; e < cv.lengths[rowId]; ++e) {
- children.addValue((int) (e + cv.offsets[rowId]), (int) e, value, cv.child);
}
}
}
This doesn't make sense... |
codereview_java_data_1770 | JID searchJID = new JID(originatingResource.getNode(), originatingResource.getDomain(), null);
List<JID> addresses = routingTable.getRoutes(searchJID, null);
for (JID address : addresses) {
- if (originatingResource != address) {
// Send the presence of the session whose... |
codereview_java_data_1775 | *
*/
@Nonnull
- public static StreamSource<Long> longStreamSource(long itemsPerSecond, long initialDelay) {
- return longStreamSource(itemsPerSecond, initialDelay, Vertex.LOCAL_PARALLELISM_USE_DEFAULT, false);
}
/**
Wrap the params like this: ```java public static StreamSource<Long... |
codereview_java_data_1776 | tabletMutator.putLocation(assignment.server, LocationType.LAST);
tabletMutator.deleteLocation(assignment.server, LocationType.FUTURE);
- //remove the old location
if (prevLastLoc != null && !prevLastLoc.equals(assignment.server)) {
tabletMutator.deleteLocation(prevLastLoc, LocationTyp... |
codereview_java_data_1780 | JSONObject result = new JSONObject();
// For old DNS-F client:
String dnsfVersion = "1.0.1";
- String agent = request.getHeader(HttpHeaderConsts.USER_AGENT_HEADER);
ClientInfo clientInfo = new ClientInfo(agent);
if (clientInfo.type == ClientInfo.ClientType.DNS &&
... |
codereview_java_data_1784 | import org.gradle.util.GFileUtils;
@CacheableTask
-@SuppressWarnings("VisibilityModifier")
public class ClassUniquenessLockTask extends DefaultTask {
// not marking this as an Input, because we want to re-run if the *contents* of a configuration changes
- private final File lockFile;
public final SetPro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.