id
stringlengths
23
26
content
stringlengths
182
2.49k
codereview_java_data_11128
String uid = fetchList.getKeyedString("UID"); long msgSeq = response.getLong(0); if (uid != null) { - try { - msgSeqUidMap.put(msgSeq, uid); - if (K9MailLib.isDebug()) { - Timbe...
codereview_java_data_11140
@SuppressWarnings("unchecked") <RET> RET attachFilter(@Nonnull PredicateEx<T> filterFn) { checkSerializable(filterFn, "filterFn"); - PredicateEx<T> adaptedPred = (PredicateEx<T>) fnAdapter.adaptFilterFn(filterFn); - FunctionEx<T, T> adaptedFn = MetricsOperatorUtil.wrap(t -> adaptedPred....
codereview_java_data_11146
validateIntegerValue(domain.getMemberExpiryDays(), "memberExpiryDays"); validateIntegerValue(domain.getRoleCertExpiryMins(), "roleCertExpiryMins"); validateIntegerValue(domain.getServiceExpiryDays(), "serviceExpiryDays"); - validateIntegerValue(domain.getGroupExpiryDays(), "serviceExpi...
codereview_java_data_11150
if (null == producer) { return; } - try { - byte[] bytes = this.getLayout().toByteArray(event); - Message msg = new Message(topic, tag, bytes); msg.getProperties().put(ProducerInstance.APPENDER_TYPE, ProducerInstance.LOG4J2_APPENDER); ...
codereview_java_data_11151
private static final String METADATA_FOLDER_NAME = "metadata"; private static final String DATA_FOLDER_NAME = "data"; - private final FileIO fileIo; - private TableMetadata currentMetadata = null; private String currentMetadataLocation = null; private boolean shouldRefresh = true; private int version...
codereview_java_data_11154
/** * Check config info. */ - private void checkConfigInfo() { // Dispatch taskes. int listenerSize = cacheMap.get().size(); // Round up the longingTaskCount. if you remove checkInfo, how do you handle doing dynamic task creation /** * Check config info. ...
codereview_java_data_11162
private final Capabilities stereotype; private final SessionId id; - private final boolean isDraining = true; private final Capabilities currentCapabilities; private final Instant startTime; Nodes are draining by default. Better to leave this as the default `false` value, no? private final...
codereview_java_data_11164
String tableName = getTableName(tableId); try { boolean result = super.canDeleteTable(c, tableId, namespaceId); - audit(c, result, CAN_DELETE_TABLE_AUDIT_TEMPLATE, tableName); return result; } catch (ThriftSecurityException ex) { - audit(c, ex, CAN_DELETE_TABLE_AUDIT_TEMPLATE, tab...
codereview_java_data_11183
} protected String getFullQualifiedTableName(String tableName) { - final List<String> levels = new ArrayList<>(Arrays.asList(icebergNamespace.levels())); levels.add(tableName); return Joiner.on('.').join(levels); } Nit: in apache iceberg, we usually use the unified `Lists.newArrayLists` to create...
codereview_java_data_11184
boolean active = true; if (propsFile.exists()) { try { - List<String> lines = Files.newBufferedReader(propsFile.toPath()).lines().collect( - Collectors.toList()); for (String line : lines) { if (line.equals("# lin...
codereview_java_data_11198
private void reportHeartbeatError(PhysicalDbInstance ins) throws IOException { final DbInstanceConfig config = ins.getConfig(); - String heartbeatError = "the dbInstance[" + config.getUrl() + "] can't reach. Please check the dbInstance status"; if (dbGroupConfig.isShowSlaveSql()) { - ...
codereview_java_data_11200
package org.apache.fineract.notification; -import edu.emory.mathcs.backport.java.util.Collections; import org.apache.fineract.notification.domain.Notification; import org.apache.fineract.notification.domain.NotificationMapper; import org.apache.fineract.notification.service.NotificationGeneratorReadRepositoryWrappe...
codereview_java_data_11213
if (config.networked && config.big) { return; } -// reconnectOften = !config.memory && config.big; testScript("testScript.sql"); testScript("comments.sql"); I'd rather leave this in and split the script files whereever we change mode if (config.networke...
codereview_java_data_11221
createRecycleAdapter(recyclerView, emptyView); } - if(feedItemFilter.getValues().length > 0) { txtvInformation.setText("{fa-info-circle} " + this.getString(R.string.filtered_label)); Iconify.addIcons(txtvInformation); txtvInformation.setVisibility(View...
codereview_java_data_11222
public String getCipherSuiteName(); /** - * Returns the language code that should be used for this connection - * (e.g. "en"). * - * @return the language code for the connection. */ Locale getLanguage(); } \ No newline at end of file Might prefer "session" here rather than "conn...
codereview_java_data_11230
public void hideKeyboard(View view) { - Log.i("hide", "hideKeyboard: "); InputMethodManager inputMethodManager =(InputMethodManager)this.getSystemService(Activity.INPUT_METHOD_SERVICE); inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0); } Please use Timber for logg...
codereview_java_data_11246
if (reader != null) reader.close(); } - - notifyConversationListListeners(); - return false; } public static interface ProgressListener { move this up into the if block if (reader != null) reader.close(); } } public static interface ProgressListener {
codereview_java_data_11249
return true; } - private void attemptAuthorization(MethodInvocation mi) { - this.logger.debug(LogMessage.of(() -> "Authorizing method invocation " + mi)); - AuthorizationDecision decision = this.authorizationManager.check(AUTHENTICATION_SUPPLIER, mi); - if (decision != null && !decision.isGranted()) { - this....
codereview_java_data_11262
* <p> * Optional. Set a bundle to customize UI * </p> - * @param mExtraCustomBundle Optional: Pass to chrome custom tab a bundle of customization flags * @return A reference to this builder. */ @SuppressWarnings("checkstyle:hiddenfield") - pu...
codereview_java_data_11272
* no-op. * * @param createServiceFn the function that creates the service instance. - * It must be stateless * @return a copy of this factory with the supplied create-service-function */ @Nonnull ```suggestion * It must be stateless. ``` * no-op. * * @param...
codereview_java_data_11277
@Override public void actionPerformed(ActionEvent e) { configuration.setHideAdvancedOptions(hideAdvancedOptions.isSelected()); - if (hideAdvancedOptions.isSelected()) looksFrame.setViewLevel(ViewLevel.NORMAL); - else looksFrame.setViewLevel(ViewLevel.ADVANCED); } }); builder.add...
codereview_java_data_11282
import com.intellij.psi.PsiElement; import com.intellij.psi.util.PsiTreeUtil; -/** - * Additional syntax highlighting, based on parsed PSI elements. - */ public class HighlightingAnnotator extends BuildAnnotator { @Override Nit: Please revert this new formatting. We're using the latest version of google-java-for...
codereview_java_data_11283
} return result; } - -// private static Playable createRemoteMediaInstance(SharedPreferences pref) { -// //TODO there's probably no point in restoring RemoteMedia from preferences, because we -// //only care about it while it's playing on the cast device. ...
codereview_java_data_11286
} public boolean isNetworkProviderEnabled() { - return locationManager.isProviderEnabled(String.valueOf(R.string.network_provider)); } public boolean isGPSProviderEnabled() { - return locationManager.isProviderEnabled(String.valueOf(R.string.gps_provider)); } public enum Loca...
codereview_java_data_11292
} private static void deleteFileIfExists(File to) throws IOException { - boolean fileDoesNotExist = to.exists(); if (fileDoesNotExist) { return; } There seems to be a `!` missing. } private static void deleteFileIfExists(File to) throws IOException { + ...
codereview_java_data_11324
return true; } if (putObjectRequest.getSSEAwsKeyManagementParams() != null && - putObjectRequest.getSSEAwsKeyManagementParams().getAwsKmsKeyId() != null) { return true; } } else if (request instanceof UploadPartRequest) { ...
codereview_java_data_11338
"FALSE" : "TRUE"); add(rows, "MODE", database.getMode().getName()); add(rows, "MULTI_THREADED", database.isMultiThreaded() ? "1" : "0"); - add(rows, "MVCC", database.isMVStore() ? "TRUE" : "FALSE"); add(rows, "QUERY_TIMEOUT", Integer.toString(sessio...
codereview_java_data_11342
} public static void calculateAllSpeeds() { - for (Entry<InetAddress, RendererConfiguration> key : addressAssociation.entrySet()) { - InetAddress sa = key.getKey(); if (sa.isLoopbackAddress() || sa.isAnyLocalAddress()) { continue; } - RendererConfiguration r = key.getValue(); if (!r.isOffline(...
codereview_java_data_11348
* @return a new module which imports the original user module and a set of marker modules. */ public Module getConfigGrammar(Module mod) { - // import CONFIG-CELLS in order to parse cells specific to configurations - Module newM = new Module( mod.name() + "-" + CONFIG_CELLS - ...
codereview_java_data_11356
.transportFactory(new TTransportFactory()) .protocolFactory(new TBinaryProtocol.Factory()) .minWorkerThreads(3) - .maxWorkerThreads(8); return new TThreadPoolServer(args); } Why was this change required? .transportFactory(new TTransportFactory()) .protocolFa...
codereview_java_data_11360
@Override protected void validate(TableMetadata base) { } } This should not be removed. There is a valid use case for the operation to check whether there are conflicts instead of re-sequencing data files. If you want, you can add a configuration method to enable/disable the validation. @Override prot...
codereview_java_data_11363
* </pre> */ public class ImapStore extends RemoteStore { - public static final ServerSettings.Type STORE_TYPE = ServerSettings.Type.IMAP; private static final int IDLE_READ_TIMEOUT_INCREMENT = 5 * 60 * 1000; private static final int IDLE_FAILURE_COUNT_LIMIT = 10; With the introduction of the enum(s) ...
codereview_java_data_11366
public static final FamilyOperandTypeChecker STRING_STRING_STRING = family(SqlTypeFamily.STRING, SqlTypeFamily.STRING, SqlTypeFamily.STRING); - public static final SqlSingleOperandTypeChecker STRING_STRING_OPTIONAL_STRING = family(ImmutableList.of(SqlTypeFamily.STRING, SqlTypeFamily.STRING, SqlTypeFam...
codereview_java_data_11368
if (reportOn(target)) { MetricOptions options = MetricOptions.ofOptions(getProperty(optionsDescriptor)); N reportLevel = parseReportLevel(getProperty(reportLevelDescriptor)); - N result = Metric.compute(metric, options, target); if (result != null && reportLeve...
codereview_java_data_11371
if (clipboardManager != null) { clipboardManager.setPrimaryClip(ClipData.newPlainText("AntennaPod", text)); } - Toast.makeText(requireContext(), getResources().getString(R.string.copied_to_clipboard), Toast.LENGTH_SHORT).show(); return true; } } Please use a Snackba...
codereview_java_data_11373
import org.springframework.cloud.deployer.spi.local.LocalDeployerAutoConfiguration; /** - * Bootstrap class for the local Spring Cloud Data Flow Server. * * @author Mark Fisher * @author Ilayaperumal Gopinathan We can get rid of `local` and say something about the `single` server. import org.springframework....
codereview_java_data_11380
* the Hadoop context for the configured job * @param scanner * the scanner to configure - * @since 1.6.0 */ @Override - protected void setupIterators(TaskAttemptContext context, ScannerBase scanner, String tableName, org.apache.accumulo.core.client.mapreduce.Accumul...
codereview_java_data_11383
public void onPause() { super.onPause(); savePreference(); - } private void savePreference() { Please revert non-code changes to keep the git history clean public void onPause() { super.onPause(); savePreference(); + webvDescription.scrollTo(0,0); } ...
codereview_java_data_11385
* A way for plugins to quickly save a call that they will need to reference * between activity/permissions starts/requests * - * @deprecated use {@link #savedLastCallId} instead in conjunction with bridge methods * {@link com.getcapacitor.Bridge#saveCall(PluginCall)}, * {@link com.getc...
codereview_java_data_11390
var compactingFiles = compacting.stream().flatMap(job -> job.getFiles().stream()).collect(Collectors.toSet()); Preconditions.checkArgument(this.allFiles.containsAll(compactingFiles), - "Compacting not in set of all files %s, compacting files %s", this.allFiles, compactingFil...
codereview_java_data_11396
import org.springframework.boot.ansi.AnsiStyle; import org.springframework.core.env.Environment; import org.springframework.core.io.ClassPathResource; -import org.springframework.core.io.Resource; import org.springframework.util.StreamUtils; import static java.nio.charset.StandardCharsets.UTF_8; Can the banner be...
codereview_java_data_11409
// Built-in checks "ArrayEquals", "MissingOverride", - "MutableConstantField", "UnusedMethod", "UnusedVariable"); Annoyingly the auto-fix for this actually results in quite a lot of lines going over the 120 char limit we have... Given that thi...
codereview_java_data_11418
if (deploy.isPresent() && deploy.get().getRunImmediately().isPresent()) { String requestId = deploy.get().getRequestId(); SingularityRunNowRequest runNowRequest = deploy.get().getRunImmediately().get(); List<SingularityTaskId> activeTasks = taskManager.getActiveTaskIdsForRequest(requestId); ...
codereview_java_data_11421
} } } finally { SingletonManager.setMode(Mode.CLOSED); } It might be useful to keep the option, so it doesn't break scripts, even if it is now a noop. } } + // Remove the tracers, we don't use them anymore. + @SuppressWarnings("deprecation") + String pat...
codereview_java_data_11424
@Override public Row lockRow(Session session, Row row) { - syncLastModificationIdWithDatabase(); - return primaryIndex.lockRow(session, row); } private void analyzeIfRequired(Session session) { Taking a lock is not a data modification, so why do we need it here? Taking a lock should n...
codereview_java_data_11426
* @return {@code this}. */ @java.lang.SuppressWarnings("all") - public SarifLog.PropertyBag.PropertyBagBuilder tags(final String[] tags) { this.tags = tags; return this; } this is for instance one of the unpleasant thing...
codereview_java_data_11432
for (int i = 0; i < union.getInputs().size(); i++) { RelNode input = union.getInput(i); List<Pair<RexNode, String>> newChildExprs = new ArrayList<>(); - for (int j = 0; j < refsIndex.cardinality(); j++) { - int pos = refsIndex.nth(j); newChildExprs.add( - Pair.<Rex...
codereview_java_data_11433
package net.sourceforge.pmd.lang.metrics; import net.sourceforge.pmd.lang.ast.QualifiableNode; import net.sourceforge.pmd.lang.ast.SignedNode; import net.sourceforge.pmd.lang.metrics.api.Metric.Version; You could use for these null checks (key + option) the utility method java.util.Objects.requireNonNull, e.g. Obj...
codereview_java_data_11447
delete -> openDeletes(delete, deleteSchema)); StructLikeSet deleteSet = Deletes.toEqualitySet( CloseableIterable.transform( - CloseableIterable.concat(deleteRecords, ThreadPools.getWorkerPool(), ThreadPools.getPoolParallelism()), deleteRecord -> (StructLike) dele...
codereview_java_data_11448
.build(); } - @SdkInternalApi - public DefaultBatchManagerTestAsyncBatchManager(BatchManagerTestAsyncClient client, - BatchManager<SendRequestRequest, SendRequestResponse, SendRequestBatchResponse> sendRequestBatchManager, - ...
codereview_java_data_11450
if (keyword != null) { CheckBox cbVis = (CheckBox) convertView.findViewById( R.id.checkbox_keyword_visibility); - cbVis.setChecked(keyword.isVisible()); cbVis.setTag(position); cbVis.setOnCheckedChangeListener( ...
codereview_java_data_11461
dataType = DataTypeResolver.fromType(itemDefinition.getStructureRef(), cl); } variable.setType(dataType); - if(defaultValue != null) { - variable.setValue(dataType.verifyDataType(defaultValue) ? defaultValue : dataType.readValue((String...
codereview_java_data_11467
// Make sure we are not null if (analysisCache == null || isIgnoreIncrementalAnalysis() && isAnalysisCacheFunctional()) { // sets a noop cache - setAnalysisCache(null); } return analysisCache; passing null here was a lousy hack to avoid double logging of the ...
codereview_java_data_11472
return !operands.get(0).getType().isNullable(); case IS_TRUE: case IS_NOT_FALSE: - case MAX: - case MIN: return operands.get(0).isAlwaysTrue(); case NOT: return operands.get(0).isAlwaysFalse(); I think this is a little bit too much...it will work; but a single isAlwaysTrue() c...
codereview_java_data_11474
public List<String> getVideoBitrateOptions(DLNAResource dlna, DLNAMediaInfo media, OutputParams params) { List<String> videoBitrateOptions = new ArrayList<>(); boolean low = false; - String customFFmpegOptions = renderer.getCustomFFmpegOptions(); int defaultMaxBitrates[] = getVideoBitrateConfig(configuratio...
codereview_java_data_11478
new String[]{"Joey", "3"} ); - assertRowsAnyOrder( "SELECT name FROM " + tableName + " LIMIT 1", - singletonList(new Row("Alice")) ); } The test works because it executes on IMDG engine :) new String[]{"Joey", "3"} ...
codereview_java_data_11479
* database snapshotting should not be repeated and streaming the binlog * should resume at the position where it left off. If the state is * reset, then the source will behave as if it were its initial start, - * so will do a database snapshot and will start trailing the binlog ...
codereview_java_data_11481
* occurring. */ public int getPort() { - checkState(hasPort(), "The given address does not include a port"); return port; } Just a minor wording suggestion: ```suggestion checkState(hasPort(), "the address does not include a port"); ``` The reason for this is that the exception could al...
codereview_java_data_11486
if (file.format().isSplittable()) { return () -> new SplitScanTaskIterator(splitSize, this); } else { - return Lists.newArrayList(this); } } I think it would be better to use `ImmutableList.of(this)`. It is good to return immutable objects even though this probably won't be mutated. And t...
codereview_java_data_11490
*/ static <T> Iterator<T> tabulate(int n, Function<? super Integer, ? extends T> f) { Objects.requireNonNull(f, "f is null"); - return Collections.tabulate(n, f, Iterator.empty(), Iterator::of); } /** here we should use the lazy `Collections.tabulate(n, f)` method */ st...
codereview_java_data_11491
TimeType timeType = TimeType.valueOf(ByteBufferUtil.toString(arguments.get(1))); InitialTableState initialTableState = InitialTableState.valueOf(ByteBufferUtil.toString(arguments.get(2))); - log.info("Init Table State: " + ByteBufferUtil.toString(arguments.get(2))); int sp...
codereview_java_data_11492
} @Test - public void nonceInsertedToTransactionIsThatProvidedFromNonceProvider() { final KeyPair signingKeys = KeyPair.generate(); final Address precompiledAddress = Address.fromHexString("1"); This test seems like it's doing more than just checking that inserted nonce is provided nonce. Perhaps some...
codereview_java_data_11495
if (useSkipper) { streamDeploymentProperties.put(SKIPPER_ENABLED_PROPERTY_KEY, "true"); } - defaultStreamService.deployStream(name, streamDeploymentProperties); } return new Assembler(new PageImpl<>(Collections.singletonList(stream))).toResource(stream); } Looks like order to create definition w...
codereview_java_data_11506
int packetType = s.startsWith("M-SEARCH") ? M_SEARCH : s.startsWith("NOTIFY") ? NOTIFY : 0; boolean redundant = address.equals(lastAddress) && packetType == lastPacketType; - if (configuration.getIpFiltering().allowed(address) && getDevice(address) != null) { String remoteAddr = address.g...
codereview_java_data_11508
actData = actArray.toArray(actData); actSeries = new FixedLineGraphSeries<>(actData); actSeries.setDrawBackground(false); - actSeries.setColor(MainApp.gc(R.color.mdtp_white)); actSeries.setThickness(3); actScale.setMultiplier(scale / 0.04d); //TODO for clarity should...
codereview_java_data_11521
import org.flowable.engine.impl.persistence.entity.DeploymentEntity; import org.flowable.engine.impl.repository.AddAsNewDeploymentMergeStrategy; import org.flowable.engine.impl.repository.AddAsOldDeploymentMergeStrategy; -import org.flowable.engine.repository.DeploymentMergeStrategy; import org.flowable.engine.impl...
codereview_java_data_11523
.collect(Collectors.toList()); assertThat(result.size()).isEqualTo(1); assertThat(result.get(0).getValue()).contains(BytesValue.of(1)); - // TODO: fix path representation - // assertThat(result.get(0).getPath()).isEqualTo(BytesValue.fromHexString("0x100000")); } @Test Does this need ...
codereview_java_data_11524
private final BlockHeader header = TestHelpers.createCliqueSignedBlockHeader(headerBuilder, proposerKeys, validatorList); - private final EpochManager epochManager = new EpochManager(10); - private final BlockHeaderBuilder builder = BlockHeaderBuilder.fromHeader(headerBuilder.buildHeader()) ...
codereview_java_data_11526
*/ package tech.pegasys.pantheon.consensus.common; import static tech.pegasys.pantheon.consensus.common.VoteType.ADD; import tech.pegasys.pantheon.ethereum.core.Address; import java.util.Objects; -import com.google.common.base.Preconditions; - public class ValidatorVote { private final VoteType votePolarity; ...
codereview_java_data_11554
* @param nodeName the node on which to do the query */ private void addQueryToNode(final XPath xPath, final String nodeName) { - List<XPath> xPaths = nodeNameToXPaths.get(nodeName); - if (xPaths == null) { - xPaths = new ArrayList<>(); - nodeNameToXPaths.put(nodeName...
codereview_java_data_11558
false, (res) -> { if (res.failed()) { - LOG.debug("Request for metrics failed", res.cause()); response.setStatusCode(HttpResponseStatus.INTERNAL_SERVER_ERROR.code()).end(); } else if (response.closed()) { LOG.trace("Request for metrics closed ...
codereview_java_data_11560
*/ static <T> Iterator<T> fill(int n, Supplier<? extends T> s) { Objects.requireNonNull(s, "s is null"); - return Collections.fill(n, s, Iterator.empty(), Iterator::of); } /** here we should also use the lazy `Collections.tabulate(n, f)` method */ static <T> Iterator<T>...
codereview_java_data_11563
protected Address[] mCc; protected Address[] mBcc; protected Address[] mReplyTo; - protected Address[] mX_OriginalTo; - protected Address[] mDeliveredTo; - protected Address[] mX_EnvelopeTo; protected String mMessageId; private String[] mReferences; We're moving away from using the `m...
codereview_java_data_11565
private static boolean allowAllClasses; private static HashSet<String> allowedClassNames; - private static Profiler profiler; /** * In order to manage more than one class loader This change is wrong. Each web session must use an own profiler as it was before your changes. You need to find some...
codereview_java_data_11566
translate(kList.get(i)).expression().toString()); } if (hasBinder) { - binders.pop(); } return new SMTLibTerm(expression); } This whole feature is extraordinary error-prone. I'd say a warning must be added here when it...
codereview_java_data_11569
Pair<Integer,String> pair1 = new Pair<>(25, "twenty-five"); Pair<Integer,String> pair2 = new Pair<>(25, "twenty-five"); Pair<Integer,String> pair3 = new Pair<>(null, null); assertNotSame(pair1, pair2); assertEquals(pair1.hashCode(), pair2.hashCode()); assertNotSame(pair2, pair3); - asse...
codereview_java_data_11573
import com.github.javaparser.symbolsolver.resolution.typesolvers.ReflectionTypeSolver; import org.junit.Test; -import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import static org.junit.Assert.assertEquals; Try slowly refactoring things from File to Path. import com.github.javapars...
codereview_java_data_11578
import de.danoeh.antennapod.core.storage.DBReader; import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; import org.robolectric.RobolectricTestRunner; Do you think this could somehow interfere with the other tests, causing the ...
codereview_java_data_11585
this.serialized = serialized; } - MaterialColor(int lightThemeLightColor, int lightThemeDarkColor, - int darkThemeLightColor, int darkThemeDarkColor, String serialized) { - this(lightThemeLightColor, lightThemeLightColor, lightThemeDarkColor, - darkThemeLightColor, dark...
codereview_java_data_11590
this(pollDelay, pollTimeUnit, Optional.<Lock> absent()); } - protected SingularityLeaderOnlyPoller(long pollDelay, TimeUnit pollTimeUnit, Optional<Lock> lockHolder) { this.pollDelay = pollDelay; this.pollTimeUnit = pollTimeUnit; this.lockHolder = lockHolder; That constructor will only ever be c...
codereview_java_data_11591
private final ObservableXPathRuleBuilder ruleBuilder = new ObservableXPathRuleBuilder(); - private static final Duration XPATH_REFRESH = Duration.ofMillis(3000); @FXML private PropertyTableView propertyView; This delay is too long. Like for the editor, 100 millis would be nicer private final Ob...
codereview_java_data_11598
testSource(); testDynamicArgumentAndReturn(); testUUID(); - testBase64(); testWhiteSpacesInParameters(); testSchemaSearchPath(); testDeterministic(); We prefer pure SQL test cases, see `TestScript` and `h2/src/test/org/h2/test/scripts/functions/string`. ...
codereview_java_data_11600
long length(); /** - * @return a list of offsets for file blocks, 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. * Only valid af...
codereview_java_data_11624
}); mCryptoSupportSignOnly.setChecked(mAccount.getCryptoSupportSignOnly()); - mCryptoSupportSignOnly.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { - public boolean onPreferenceChange(Preference preference, Object newValue) { - ...
codereview_java_data_11626
@Override public SnapshotTable.Result execute() { JobGroupInfo info = newJobGroupInfo("SNAPSHOT-TABLE", - String.format("Snapshotting table %s(location=%s)", sourceTableIdent().toString(), destTableLocation)); return withJobGroupInfo(info, this::doExecute); } I think it is important to show t...
codereview_java_data_11628
public TabletMigration(TabletId tabletId, TabletServerId oldTabletServer, TabletServerId newTabletServer) { - requireNonNull(tabletId); - requireNonNull(oldTabletServer); - requireNonNull(newTabletServer); - - this.tabletId = tabletId; - this.oldTabletServer = oldTabletServer; - this.newTabl...
codereview_java_data_11635
requestHeader.setHaServerAddr(haServerAddr); requestHeader.setCompressed(true); RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.REGISTER_BROKER, requestHeader); - RegisterBrokerBody requestBody = new RegisterBrokerBody(); requestBody.setTopicConfig...
codereview_java_data_11639
Range seekRange = range; if (range.getEndKey() != null) { - Key seekKey = new Key(seekRange.getEndKey()); if (range.getEndKey().getTimestamp() != Long.MIN_VALUE) { seekKey = new Key(seekRange.getEndKey()); seekKey.setTimestamp(Long.MIN_VALUE); This always creates a new Key, but ...
codereview_java_data_11640
ZooReader zr = context.getZooReaderWriter(); String zPath = propPathPrefix + "/" + prop.getKey(); try { - if (zr.exists(zPath) && zr.getData(zPath, null) != null) { return true; } } catch (KeeperException|InterruptedException e) { I am not sure the calls to `exist...
codereview_java_data_11641
package fr.free.nrw.commons; -import fr.free.nrw.commons.contributions.model.DisplayableContribution; public interface ViewHolder<T> { - void init(int position, - DisplayableContribution contribution); } I'm a bit confused by this. `ViewHolder` is meant to be a generic holder object for a model (the g...
codereview_java_data_11652
private static final long serialVersionUID = -1973296520918624767L; private static final int MAX_BODY_SIZE_FOR_DATABASE = 16 * 1024; static final long INVALID_MESSAGE_PART_ID = -1; - private static final int INVALID_UID_VALIDITY = -1; - private static final int INVALID_HIGHEST_MOD_SEQ = -1; pr...
codereview_java_data_11670
private List<Group> groups; private List<Policy> policies; private List<ServiceIdentity> services; - private Map<String, StringList> tags; private Domain domain = null; public AthenzDomain(String name) { why did we add tags as a field here? The domain object below already has the tags as a ...
codereview_java_data_11673
config = createMap(accumuloPropsLocation, overrides); } - private static Map<String,String> createMap(URL accumuloPropsLocation, Map<String,String> overrides) { CompositeConfiguration config = new CompositeConfiguration(); config.setThrowExceptionOnMissing(false); Could use the guava immutabl...
codereview_java_data_11686
import org.apache.iceberg.types.Types; public interface Unbound<T, B> { /** * Bind this value expression to concrete types. Does it have to extend `ValueExpression`? import org.apache.iceberg.types.Types; +/** + * Represents an unbound expression node. + * @param <T> the Java type of values produced by this...
codereview_java_data_11694
System.out.println(indent + "Up to size Count %-age"); for (int i = 1; i < countBuckets.length; i++) { System.out.println(String.format("%s%11s : %10d %6.2f%%", indent, - bigNumberForSize(Double.valueOf(Math.pow(10, i)).longValue()), countBuckets[i], sizeBuckets[...
codereview_java_data_11695
scanState.scanID = null; if (scanState.isolated) { - child2.recordException(e, Attributes.builder().put("exception.message", e.getMessage()) - .put("exception.escaped", true).build()); throw new IsolationException(); } - child2.recordExcep...
codereview_java_data_11696
for (String file : opts.files) { AccumuloConfiguration aconf = DefaultConfiguration.getInstance(); - CryptoService cryptoService = CryptoServiceFactory.newInstance(aconf); Path path = new Path(file); CachableBlockFile.Reader rdr = new CachableBlockFile.Reader(fs, path, conf, null, null, a...
codereview_java_data_11701
throw new UnsupportedOperationException("Out of scope for antlr current implementations"); } @Override default boolean hasImageEqualTo(final String image) { throw new UnsupportedOperationException("Out of scope for antlr current implementations"); You should return null here instead. N...
codereview_java_data_11708
* @return Returns a reference to this object so that method calls can be chained together. */ default Builder destination(File destination) { return destination(destination.toPath()); } Null Check/Validations missing * @return Returns a reference to this ob...
codereview_java_data_11724
processFetchResponses(remoteMessagesToDownload, qresyncParamResponse, flagSyncHelper, syncHelper); int newLocalMessageCount = remoteMessagesToDownload.size() + localFolder.getMessageCount(); if (imapFolder.getMessageCount() >= localFolder.getVisibleLimit() && imapFolder.getMessageCount() >= ...