id
stringlengths
23
26
content
stringlengths
182
2.49k
codereview_java_data_7686
activeNotifications.remove(holder); int notificationId = holder.notificationId; - notificationIdsInUse.delete(notificationId); if (!additionalNotifications.isEmpty()) { NotificationContent newContent = additionalNotifications.removeFirst(); All other places that access `n...
codereview_java_data_7689
package net.fabricmc.yarn.constants; /** - * Constants of World Event IDs.<br> * World Events are used to trigger things on the client from the server side. - * Most commonly, playing sound events or spawning particles.<br> * Some events have an extra data integer sent alongside them.<br> - * Some events are glob...
codereview_java_data_7694
BigInteger bi = new BigInteger(sqlCommand.substring(start, i)); if (bi.compareTo(ValueLong.MAX_BI) <= 0) { // parse constants like "10000000L" - if (chars[i] == 'L') { parseIndex++; } currentValue = ValueLon...
codereview_java_data_7702
} /** - * Return the tags associated with the snapshot, or null if no tag is associated with the snapshot. - * @return tags associated with the snapshot, or null if no tag is associated with the snapshot. */ default List<String> tags() { return null; Nit: 'if no tags are' } /** + * Retur...
codereview_java_data_7705
import javax.jws.WebService; /** - * A simple example of how to setup a JAX-WS Web Service. - * It can say hello to everyone or to someone in particular. * * @author lnewson@redhat.com */ -@WebService(targetNamespace="http://www.jboss.com/jbossas/quickstarts/wshelloworld/HelloWorld") public interface HelloWor...
codereview_java_data_7711
* @return the current instance * @since 2.0.0 */ - public MiniAccumuloConfig setClasspathItems(String... classpathItems) { impl.setClasspathItems(classpathItems); return this; } Could call this `setClasspath` and drop `Items`. I don't think `Items` adds any useful information. * @return ...
codereview_java_data_7719
* same UUID is found in the settings file.<br> * <strong>Note:</strong> This can have side-effects we currently don't handle, e.g. * changing the account type from IMAP to POP3. So don't use this for now! - * @param outboxName - * localised name of outbox folder...
codereview_java_data_7724
} /** - * Returns the bootstrapped {@code JetInstance}. The instance will automatically - * be shutdown once the {@code main()} method of the JAR returns. */ public static JetInstance getInstance() { return SUPPLIER.get().instance; "will be automatically shut down" } /*...
codereview_java_data_7727
private NotificationWorkerFragment mNotificationWorkerFragment; private RVRendererAdapter<Notification> adapter; private List<Notification> notificationList; - public static boolean isarchivedvisible = false; MenuItem notificationmenuitem; - Toolbar toolbar; TextView nonotificationtext; ...
codereview_java_data_7740
List<T> parents = new ArrayList<>(); Node parentNode = jjtGetParent(); while (parentNode != null) { - if (parentType.isInstance(parentNode.getClass())) { parents.add((T) parentNode); } parentNode = parentNode.jjtGetParent(); This is the c...
codereview_java_data_7748
import com.hazelcast.internal.metrics.ProbeLevel; import com.hazelcast.internal.metrics.ProbeUnit; import com.hazelcast.jet.core.metrics.Metric; import com.hazelcast.jet.core.metrics.Unit; import javax.annotation.Nonnull; we should also maybe add a tag specific for user metrics? import com.hazelcast.internal.me...
codereview_java_data_7757
import android.widget.ScrollView; import android.widget.TextView; import java.util.Date; import static java.lang.System.currentTimeMillis; String comparison using == import android.widget.ScrollView; import android.widget.TextView; +import java.io.UnsupportedEncodingException; +import java.security.MessageDiges...
codereview_java_data_7759
public void onViewCreated(final View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); - mAllergensFromDao = Utils.getAppDaoSession(this.getActivity()).getAllergenDao().loadAll(); api = new OpenFoodAPIClient(getActivity()); mView = view; ...
codereview_java_data_7763
private static final String COPYRIGHT_LINE = "Copyright (c) 2008-2019, Hazelcast, Inc. All Rights Reserved."; private final Node node; private volatile JetService jetService; - private volatile ILogger logger; NodeExtensionCommon(Node node) { this.node = node; } void afterStart...
codereview_java_data_7765
import java.util.concurrent.FutureTask; import java.util.concurrent.TimeUnit; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import com.google.inject.Inject; import com.hubspot.singularity.executor.config.SingularityExecutorConfiguration; import com.spotify.docker.client.DockerClient; I would only l...
codereview_java_data_7766
spec.commandLine().usage(out); } - @FunctionalInterface - public interface KeyLoader { - SECP256K1.KeyPair load(final File keyFile) throws IOException; - } - private Optional<KeyPair> getKeyPair() { try { return Optional.of(keyLoader.load(parentCommand.nodePrivateKeyFile())); (style) Usual...
codereview_java_data_7778
import org.apache.iceberg.exceptions.AlreadyExistsException; import org.apache.iceberg.exceptions.CommitFailedException; import org.apache.iceberg.exceptions.NoSuchTableException; -import org.apache.iceberg.io.CloseableGroup; import org.apache.iceberg.relocated.com.google.common.base.MoreObjects; import org.apache...
codereview_java_data_7779
*/ package org.kie.kogito; -import org.kie.kogito.rules.KieConfig; - /** * Marker interface to identify a KogitoConfig (i.e. ProcessConfig, ...) */ -public interface KogitoConfig extends KieConfig { } This should be reverted */ package org.kie.kogito; /** * Marker interface to identify a KogitoConfig (...
codereview_java_data_7785
private boolean isEligibleForShuffle(SingularityTaskId task, Set<String> requestBlacklist) { Optional<SingularityTaskHistoryUpdate> taskRunning = taskManager.getTaskHistoryUpdate(task, ExtendedTaskState.TASK_RUNNING); - // requestBlacklist = dynamic list from zookeeper - // configuration = constant list f...
codereview_java_data_7788
EXPECTED_CHANNEL_QUALIFIER(ERROR, 120, "expected channel reference '':<channel>'' but found ''{0}''"), // EXPECTED_CHANNEL_NAME(ERROR, 121, "expected channel name but found ''{0}''"), // ILLEGAL_STREAM_NAME(ERROR, 122, "illegal name for a stream ''{0}''"), // - ILLEGAL_TASK_NAME(ERROR, 122, "illegal name for a ta...
codereview_java_data_7797
// Network private static final String PREF_ENQUEUE_DOWNLOADED = "prefEnqueueDownloaded"; public static final String PREF_UPDATE_INTERVAL = "prefAutoUpdateIntervall"; - public static final String PREF_MOBILE_UPDATE_OLD = "prefMobileUpdate"; public static final String PREF_MOBILE_UPDATE = "prefMob...
codereview_java_data_7807
reason + " ~~~~"; - String logPageString = "\n" + "{{Commons:Deletion requests" + media.getFilename() + "}}\n"; SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd", Locale.getDefault()); String date = sdf.format(calendar.getTime()); I gue...
codereview_java_data_7810
import java.util.List; import java.util.Objects; import java.util.Set; -import java.util.function.Predicate; import java.util.stream.Collectors; import org.junit.Test; Instead of this, wouldn't it be simpler to make `Lz4Substitution` and `SnappySubstitution` implement `Compressor<ByteBuf>`? import java.util.Lis...
codereview_java_data_7814
minerNode1.verify(blockchain.minimumHeight(1)); minerNode1.execute(cliqueTransactions.createAddProposal(minerNode2)); - cluster.verify(blockchain.minimumHeightProgression(minerNode1, 1)); cluster.verify(clique.validatorsAtBlockEqual("0x2", minerNode1, minerNode2)); cluster.verify(clique.validator...
codereview_java_data_7817
public void testVerifiedIllegalWidth() { AssertHelpers.assertThrows("Should fail if width is less than or equal to zero", IllegalArgumentException.class, - "The width of truncate must larger than zero", () -> Truncate.get(Types.IntegerType.get(), 0)); } } `must larger` -> `must be ...
codereview_java_data_7823
new ResendConfirmationCodeRequest() .withUsername(userId) .withClientId(clientId) - .withSecretHash(secretHash); final String pinpointEndpointId = pool.getPinpointEndpointId(); resendConfirmationCodeRequest.setUs...
codereview_java_data_7833
private String code; private String clientId; private String redirectUri; - private AuthorizationGrantType grantType; private AuthorizationCodeTokenRequestAttributes() { } The grant type member is not needed here as it's implied based on the class name -> `AuthorizationCodeTokenRequestAttributes`. Can you re...
codereview_java_data_7846
* Simple log to print to console. It conforms to the * {@code com.amazonaws.logging.Log} interface. */ -public class ConsoleLog implements com.amazonaws.logging.Log { /** Tag for the log message */ private final String tag; ```suggestion public final class ConsoleLog implements com.amazonaws.logging.Lo...
codereview_java_data_7852
private final AuthenticationManagerResolver<String> issuerAuthenticationManagerResolver; - private final Converter<HttpServletRequest, String> issuerConverter; /** * Construct a {@link JwtIssuerAuthenticationManagerResolver} using the provided For consistency with other Spring Security classes, let's introduce ...
codereview_java_data_7854
get("/streams/deployments/{timelog}?reuse-deployment-properties=true", "timelog") .contentType(MediaType.APPLICATION_JSON) .content(json)) - .andDo(print()) .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters(parameterWithName("timelog") We can r...
codereview_java_data_7855
private static final int cqFileSize = 10; private static final int cqExtFileSize = 10 * (ConsumeQueueExt.CqExtUnit.MIN_EXT_UNIT_SIZE + 64); - private static SocketAddress BornHost; - private static SocketAddress StoreHost; DefaultMessageStore messageStore; MessageStoreConfig messageStoreConfig...
codereview_java_data_7865
Keyword.getVisibleKeywords(mMessage.getFlags())); fragment.show(getFragmentManager(), "tag_choice"); } catch (Exception e) { - e.printStackTrace(); } } Use logging instead of this. Keyword.getVisibleKeywords(mMessage.getFlags())); ...
codereview_java_data_7867
private XMLStreamWriter xmlWriter; private OutputStream stream; - private byte[] lineSeparator = new byte[0]; public XMLRenderer() { super(NAME, "XML format."); this initialization seems moot, right? ```suggestion private byte[] lineSeparator; ``` private XMLStreamWriter xmlWriter; ...
codereview_java_data_7874
@Test public void testNotFilterForm() { String sql = "select count(distinct \"the_month\") from " + "\"foodmart\" where \"the_month\" <> \'October\'"; sql(sql, FOODMART) .returnsOrdered("EXPR$0=11"); } } can you add the expected druid filter and/or plan to make sure that drui...
codereview_java_data_7877
void scheduleSnapshot(MasterContext mc, long executionId) { long snapshotInterval = mc.jobConfig().getSnapshotIntervalMillis(); ExecutionService executionService = nodeEngine.getExecutionService(); - logFine(logger, "%s snapshot is scheduled in %d ms", mc.jobIdString(), snapshotInterval); ...
codereview_java_data_7878
package tech.pegasys.pantheon.ethereum.p2p.peers; import static java.nio.charset.StandardCharsets.UTF_8; import tech.pegasys.pantheon.util.enode.EnodeURL; be nicer to use the jsonArray.stream instead of populating a set package tech.pegasys.pantheon.ethereum.p2p.peers; import static java.nio.charset.StandardChar...
codereview_java_data_7880
if (isInternetOn(context)) { return true; } else - Toast.makeText(context,R.string.internet_is_off,Toast.LENGTH_SHORT).show(); return false; } public static void promptSpeechInput(Activity activity, int requestCode, View parentView, String promtMsg) { Why wa...
codereview_java_data_7881
DefaultCompactionPlanner.class.getName(), PropertyType.CLASSNAME, "Planner for default compaction service."), TSERV_COMPACTION_SERVICE_DEFAULT_MAX_OPEN( - "tserver.compaction.service.default.planner.opts.maxOpen", "30", PropertyType.COUNT, "The maximum number of files a compaction will open...
codereview_java_data_7883
import org.vividus.steps.ui.model.SequenceAction; import org.vividus.steps.ui.model.SequenceActionType; -public class AbstractParametersToSequenceActionConverter<T extends SequenceActionType<?>> extends AbstractParameterConverter<Parameters, SequenceAction<T>> { private final StringToLocatorConverter s...
codereview_java_data_7893
* Request mapping information. to find the matched method by request * * @author horizonzy - * @since 1.3.1 */ public class RequestMappingInfo { 1.3.1 has released, so the since should be upper 1.3.1 * Request mapping information. to find the matched method by request * * @author horizonzy + * @since 1...
codereview_java_data_7910
if (this.blockCacheManager != null) { this.blockCacheManager.stop(); } - } catch (RuntimeException e1) { - throw new RuntimeException(e1); } } } This catch block could probably be removed. if (this.blockCacheManager != null) { this.blockCacheManager.stop(); ...
codereview_java_data_7917
package com.hazelcast.jet.function; import java.util.function.Predicate; /** * Represents a predicate which accepts three arguments. This * is the three-arity specialization of {@link Predicate}. `TriPredicate` is now lacking the composition methods. package com.hazelcast.jet.function; +import javax.annotatio...
codereview_java_data_7919
// grab this outside of tablet lock. @SuppressWarnings("deprecation") - int maxLogs = tableConfiguration.getCount(tableConfiguration - .resolve(Property.TSERV_WAL_MAX_REFERENCED, Property.TSERV_WALOG_MAX_REFERENCED)); String reason = null; synchronized (this) { It looks like `TABLE_MINC_L...
codereview_java_data_7926
modelBuilder.addRow().addValue("Security").addValue(securityInfo); rowIndex++; - if (securityInfo.isAuthenticated() && securityInfo.isAuthorizationEnabled()) { - final List<String> roles = securityInfo.getRoles(); - if (roles.isEmpty()) { - roles.add("No roles assigned"); - } - modelBuilder.addRow().a...
codereview_java_data_7930
return "enode://" + keyPair.getPublicKey().toString() + "@" + LOCALHOST + ":" + p2pPort; } - KeyPair keyPair() { - return keyPair; - } - private Optional<String> jsonRpcBaseUrl() { if (jsonRpcEnabled) { return Optional.of( I don't think we need this method. It looks like we're taking the Ke...
codereview_java_data_7940
@Override public void heartbeat(Event event) { long now = System.currentTimeMillis(); - LOG.debug("Heartbeat from mesos. Delta since last heartbeat is {}ms", now - lastHeartbeatTime.getAndSet(now)); } @Override seems like a weird thing to have the getAndSet inside the debug line. I know it gets eva...
codereview_java_data_7967
* Base class for processor wrappers. Delegates all calls to the wrapped * processor. */ -public class ProcessorWrapper implements Processor { private final Processor wrapped; should also be abstract class * Base class for processor wrappers. Delegates all calls to the wrapped * processor. */ +public ...
codereview_java_data_7981
@Override public Capabilities getCanonicalCapabilities() { - return new ImmutableCapabilities(BROWSER_NAME, BrowserType.EDGE, PLATFORM_NAME, System.getProperty("os.name")); } @Override Also not needed. @Override public Capabilities getCanonicalCapabilities() { + return new ImmutableCapabilitie...
codereview_java_data_8008
private int index; - private AtomicInteger dataSize = new AtomicInteger(0); private long lastDispatchTime = 0L; There is no need, the task dispatcher is a singleton. private int index; + private int dataSize = 0; private long lastDispatchTime = 0L;
codereview_java_data_8010
@Test public void testQueryByEmptyDeploymentIds() { - assertThrows(FlowableIllegalArgumentException.class, () -> { - appRepositoryService.createAppDefinitionQuery().deploymentIds(new HashSet<>()).list(); - }); } @Test If we are going for AssertJ fluent I say we go all in. S...
codereview_java_data_8015
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, - compactingF...
codereview_java_data_8016
throws IOException, AccumuloException, AccumuloSecurityException, TableNotFoundException; } - private static class ConcurrentKeyExtentCache implements KeyExtentCache { private static final Text MAX = new Text(); KeyExtentCache, or more specifically ConcurrentKeyExtentCache, could probably use a unit ...
codereview_java_data_8023
public class ImageUtils { /** * Resize an image to the given width and height considering the preserveAspectRatio flag. * @param bitmap Will this be a breaking change? You've added a new parameter to this public method in the Android platform. Will calls such as `ImageUtils.resize(bitmap, 100, 100)` contin...
codereview_java_data_8024
import javax.enterprise.event.Observes; import javax.inject.Singleton; -import io.quarkus.arc.config.ConfigProperties; -import io.quarkus.runtime.Startup; import io.quarkus.runtime.StartupEvent; import org.eclipse.microprofile.config.inject.ConfigProperty; import org.kie.kogito.monitoring.elastic.common.ElasticCon...
codereview_java_data_8029
return cpuUsageForRequest/memUsageForRequest; } - private double getEstimatedCpuUsageForRequest(RequestUtilization requestUtilization) { // To account for cpu bursts, tend towards max usage if the app is consistently over-utilizing cpu, tend towards avg if it is over-utilized in short bursts return (...
codereview_java_data_8034
} private String genGroupNameForTrace() { - return TraceConstants.GROUP_NAME_PREFIX + "-" + this.group; } @Override if it can trace when the multi consumers or producers with the same group name? } private String genGroupNameForTrace() { + return TraceConstants.GROUP_NAME_P...
codereview_java_data_8035
testScript("testScript.sql"); testScript("derived-column-names.sql"); testScript("information_schema.sql"); - if (!config.mvStore) { // we get slightly different explain plan stuff here in PageStore mode testScript("joins.sql"); } This condition shou...
codereview_java_data_8038
public CompilationUnit parse() throws ParseException { try { return astParser.CompilationUnit(); - }finally { closeProvider(); } } Nitpicking, level master: we could add a space before finally public CompilationUnit parse() throws ParseException { ...
codereview_java_data_8040
/** * Converts this collection to a {@link SortedMap}. * - * @param comparator A comparator that induces an order of the Map keys. * @param keyMapper A function that maps an element to a key * @param valueMapper A function that maps an element to a value * @param merge A functi...
codereview_java_data_8045
mChooseIdentityButton = (TextView) findViewById(R.id.identity); mChooseIdentityButton.setOnClickListener(this); - /* - if (mAccount.getIdentities().size() == 1 && - Preferences.getPreferences(this).getAvailableAccounts().size() == 1) { - mChooseIdentityButton.se...
codereview_java_data_8051
public String toStringShort() { if (isAbsolute) { - if(SP.getBoolean(R.string.key_danar_visualizeextendedaspercentage, false)){ Profile profile = MainApp.getConfigBuilder().getProfile(); if(profile != null) { double basal = profile.getBasal...
codereview_java_data_8055
.commit(); } - public void setActionBarNotificationBarColor(MaterialColor color) { getSupportActionBar().setBackgroundDrawable(new ColorDrawable(color.toActionBarColor(this))); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { why is this public? .commit(); ...
codereview_java_data_8057
* Delete segment path */ public static boolean deleteSegmentParquetStoragePath(CubeInstance cube, String segmentName, String identifier) throws IOException { - if (cube == null) { return false; } String path = getSegmentParquetStoragePath(cube, segmentName, identif...
codereview_java_data_8088
iconTintManager.updateTint(); if (feed != null) { MenuItemUtils.setupSearchItem(menu, (MainActivity) getActivity(), feedID, feed.getTitle()); } if (feed == null || feed.getLink() == null) { menu.findItem(R.id.share_link_item).setVisible(false); If the feed ...
codereview_java_data_8094
import net.sourceforge.pmd.cpd.internal.JavaCCTokenizer; import net.sourceforge.pmd.lang.TokenManager; import net.sourceforge.pmd.lang.jsp.ast.JspTokenManager; public class JSPTokenizer extends JavaCCTokenizer { @Override protected TokenManager getLexerForSource(SourceCode sourceCode) { - return ne...
codereview_java_data_8095
if (isNotBlank(product.getImageIngredientsUrl())) { if (!Locale.getDefault().getLanguage().equals(product.getLang())) { - addPhotoLabel.setText("Take a photo of the ingredients in "+Locale.getDefault().getDisplayLanguage()); mUrlImage = null; } else { ...
codereview_java_data_8103
/** * Specify the number of rows fetched by the linked table command - * - * @param fetchSize */ - public void setFetchSize(Expression fetchSize){ - this.fetchSize =fetchSize; } @Override In H2's sources binary operators are formatted with spaces around them. /** ...
codereview_java_data_8111
protected Optional<BigInteger> chainId = Optional.empty(); - public Builder chainId(final Optional<BigInteger> chainId) { - this.chainId = chainId; - return this; - } - public Builder chainId(final BigInteger chainId) { this.chainId = Optional.of(chainId); return this; did you e...
codereview_java_data_8116
throw e; } catch (Exception e) { if (e.getCause().getClass().equals(ThriftTableOperationException.class) - && e.getMessage().equals("Table is being deleted")) { // acceptable } else { throw new RuntimeException(e); It might be useful to make `Table is ...
codereview_java_data_8117
private void authenticate() throws MessagingException, IOException { switch (settings.getAuthType()) { case XOAUTH2: - if (hasCapability(Capabilities.AUTH_XOAUTH2) && hasCapability(Capabilities.SASL_IR) - && oauthTokenProvider != null) { ...
codereview_java_data_8121
@Test public void testQueryByAssignedOr() { TaskQuery query = taskService.createTaskQuery().or().taskId("invalid").taskAssigned(); - assertThat(query.count()).isEqualTo(0); - assertThat(query.list()).hasSize(0); } @Test It seems like the `or` is not working correctly. This sh...
codereview_java_data_8126
return false; } - if (ommerValidationMode != HeaderValidationMode.LIGHT - && ommerValidationMode != HeaderValidationMode.LIGHT_SKIP_DETACHED - && ommerValidationMode != HeaderValidationMode.LIGHT_DETACHED_ONLY) { return isOmmerSiblingOfAncestor(context, current, ommer); } else {...
codereview_java_data_8127
paramLabel = MANDATORY_DOUBLE_FORMAT_HELP, description = "Percentage of remote wire connections that can be established. Must be between 0 and 100 inclusive. (default: ${DEFAULT-VALUE})", - arity = "1") private final Percentage remoteConnectionsPercentage = Fraction.fromDouble(DE...
codereview_java_data_8132
public void startReloader() { if (isEnabled) { reloadingFuture = executor.scheduleAtFixedRate(this::reloadZkValues, 0, cacheTtl, TimeUnit.SECONDS); } should this also synchronously perform the first fetch I wonder? Would avoid the case where getAll was incorrectly empty or get(K key) was n...
codereview_java_data_8138
public void handleNewBlockEvent(final NewChainHead newChainHead) { final BlockHeader newBlockHeader = newChainHead.getNewChainHeadHeader(); final BlockHeader currentMiningParent = currentHeightManager.getParentBlockHeader(); - LOG.debug("Handling New Chain head event, chain length = {}", currentMiningPa...
codereview_java_data_8139
@Test public void testDeprecatedAttributeXPathQuery() throws JaxenException { - final StringWriter writer = new StringWriter(); - class MyRootNode extends DummyNode implements RootNode { private MyRootNode(int id) { within the pmd test codebase there is a `JavaUtilLoggingRule` ju...
codereview_java_data_8140
// ./gradlew test -Drecreate=true String shouldRecreate = System.getProperty("recreate", "false"); task.systemProperty("recreate", shouldRecreate); - task.getInputs().property("recreate", shouldRecreate); }); project.getPlugins().withType(JavaPlugin.cl...
codereview_java_data_8141
return getInt("partitioner.finalizer.delay.seconds"); } - public TimeZone getTimeZone(){ - return Strings.isNullOrEmpty(getString("secor.parser.timezone")) ? TimeZone.getTimeZone("UTC") : TimeZone.getTimeZone(getString("secor.parser.timezone")); } public boolean getBoolean(String name...
codereview_java_data_8147
// accumulo garbage collector properties GC_PREFIX("gc.", null, PropertyType.PREFIX, "Properties in this category affect the behavior of the accumulo garbage collector."), - GC_CANDIDATE_BATCH_SIZE("gc.candidate.batch.size", "8m", PropertyType.BYTES, "The batch size used for garbage collection."), ...
codereview_java_data_8154
public TabletMutator putCompactionId(long compactionId); - public TabletMutator putLocation(TServer tsi, LocationType type); - public TabletMutator deleteLocation(TServer tsi, LocationType type); public TabletMutator putZooLock(ZooLock zooLock); Maybe name this tsInstance. public TabletMutator pu...
codereview_java_data_8169
import org.apache.arrow.vector.ValueVector; -public class ArrowVectorAccessor<DecimalT, Utf8StringT, ArrayT, ChildVectorT extends AutoCloseable> { private final ValueVector vector; private final ChildVectorT[] childColumns; how come final? Does that still make sense now that we are using thsi as a base class? ...
codereview_java_data_8171
updatePossiblyUnderProvisionedAndOverProvisionedIds(requestWithState, numInstances, overProvisionedRequestIds, possiblyUnderProvisionedRequestIds); } - removePendingRequestIds(possiblyUnderProvisionedRequestIds); final List<String> underProvisionedRequestIds = getUnderProvisionedRequestIds(possiblyU...
codereview_java_data_8173
} private Optional<String> determineKind(String optionContext) { - return Arrays.stream(optionContext.split(" ")) .filter(s -> s.startsWith("existing")) .map(s -> s.substring("existing-".length())) .findFirst(); Should it actually be `split("\\s+")`? } private Optional<String> determineKind(Strin...
codereview_java_data_8179
MASTER_REPLICATION_COORDINATOR_THREADCHECK("master.replication.coordinator.threadcheck.time", "5s", PropertyType.TIMEDURATION, "The time between adjustments of the coordinator thread pool"), @Deprecated MASTER_STATUS_THREAD_POOL_SIZE("master.status.threadpool.size", "1", PropertyType.COUNT, ...
codereview_java_data_8192
JAVA_7(new Java7Validator(), null), JAVA_8(new Java8Validator(), null), JAVA_9(new Java9Validator(), null), - JAVA_10(null, new Java10PostProcessor()); final Validator validator; final ParseResult.PostProcessor postProcessor; Maybe we could call it JAVA_10_preview an...
codereview_java_data_8201
* @return ConditionalWriter object for writing ConditionalMutations * @throws TableNotFoundException * when the specified table doesn't exist */ ConditionalWriter createConditionalWriter(String tableName) throws TableNotFoundException; ```suggestion * when the specified table doesn't exist...
codereview_java_data_8205
public static final RpcApi ADMIN = new RpcApi("ADMIN"); public static final RpcApi EEA = new RpcApi("EEA"); - public static final Collection<RpcApi> DEFAULT_JSON_RPC_APIS = Arrays.asList(ETH, NET, WEB3, EEA); public static Optional<RpcApi> valueOf(final String name) { if (name.equals(ETH.getCliValue())) ...
codereview_java_data_8215
} /** - * Sets the resolver used for resolving {@link OAuth2AuthorizationRequest}'s. * * @since 5.1 * @param authorizationRequestResolver the resolver used for resolving authorization requests */ - public final void setAuthorizationRequestResolver(OAuth2AuthorizationRequestResolver authorizationRequest...
codereview_java_data_8218
public static final String COUNTER_PREFIX = "counter."; - private MetricRepository metricRepository; private final ResourceAssembler<Metric<Double>, CounterResource> counterResourceAssembler = new DeepCounterResourceAssembler(); How is the repository injected now? public static final String COUNTER_PREFIX =...
codereview_java_data_8224
Text defaultTabletRow = TabletsSection.getRow(prevTablet.getTableId(), null); if (range.contains(new Key(defaultTabletRow))) { throw new IllegalStateException( - "Read all tablets but did not see default tablet. Last tablet seen : " + prevTablet.getExtent()); }...
codereview_java_data_8234
else switchedPath = le.filename; - String switchedLog = switchVolume(le.filename, FileType.WAL, replacements); - if (switchedLog != null) { numSwitched++; } This doesn't even need to be assigned to a variable... can just check if method return is null. else switchedPath = le....
codereview_java_data_8237
return Arrays.stream(validators).map(PantheonNode::getAddress).sorted().toArray(Address[]::new); } - public Condition proposerAtChainHeadEqual(final PantheonNode proposer) { return new ExpectBlockHasProposer(eth, proposer.getAddress()); } maybe not a clique thing? return Arrays.stream(validators...
codereview_java_data_8243
} public void setAutoCommitIntervalMillis(long autoCommitIntervalMillis) { - if (autoCommitIntervalMillis >= 1000) { this.autoCommitIntervalMillis = autoCommitIntervalMillis; } } It would be better if you can replace this magic number(1000) with a constant variable. } ...
codereview_java_data_8258
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import static java.util.stream.Collectors.toList; import static org.kie.kogito.codegen.rules.KogitoPackageSources.getReflectConfigFile; import static org.kie.pmml.commons.utils.KiePMMLModelUtils.getSanitizedClassName; Please compile locally to fix import so...
codereview_java_data_8259
for (Entry<String,Long> entry : totalBlocks.entrySet()) { final String host = entry.getKey(); final Long blocksForHost = entry.getValue(); - System.out.printf("%15s %5.1f %8d%n", host, - (localBlocks.get(host) * 100.) / blocksForHost, blocksForHost); } ...
codereview_java_data_8260
* @param properties the properties * @see #OPTION_SKIP_BLOCKS * @see #OPTION_SKIP_BLOCKS_PATTERN */ public void setProperties(Properties properties) { skipBlocks = Boolean.parseBoolean(properties.getProperty(OPTION_SKIP_BLOCKS, Boolean.TRUE.toString())); let's add `@see #OPTION_IG...
codereview_java_data_8265
authorLayout.setVisibility(GONE); } - if(applicationKvStore.getBoolean("login_skipped") == true){ delete.setVisibility(GONE); } Please remove `== true`. Shorter and easier to read :-) authorLayout.setVisibility(GONE); } + if(applicationKv...
codereview_java_data_8268
if (closed) return; - Span span = TraceUtil.getTracer().spanBuilder("TabletServerBatchWriter::close").startSpan(); try (Scope scope = span.makeCurrent()) { closed = true; Since we have `TraceUtil` anyway, it might be useful to just make a method in `TraceUtil.java` that does: ```java Span ne...
codereview_java_data_8272
private static final int PERSON_COUNT = 100; - private static String DB_CONNECTION_URL; @BeforeClass public static void setupClass() throws SQLException, IOException { String dbName = ReadJdbcPTest.class.getSimpleName(); String tempDirectory = Files.createTempDirectory(dbName).toStri...
codereview_java_data_8279
import javax.annotation.PostConstruct; import javax.inject.Inject; import io.quarkus.runtime.Startup; import org.kie.kogito.eventdriven.rules.AbstractEventDrivenQueryExecutor; import org.kie.kogito.rules.RuleUnit; Why startup? Isn't `@ApplicationScoped` enough? import javax.annotation.PostConstruct; import jav...