id
stringlengths
29
30
content
stringlengths
152
2.6k
codereview_new_java_data_10945
void registerInstance(String serviceName, String groupName, String ip, int port, * @param groupName group of service * @param instances instances to deRegister * @throws NacosException nacos exception - * @since 2.1.1 */ - void batchDeRegisterInstance(String serviceName, String group...
codereview_new_java_data_10946
*/ public class ConfigAdvanceInfo implements Serializable { - static final long serialVersionUID = -3148031484920416869L; private long createTime; ```suggestion static final long serialVersionUID = 3148031484920416869L; ``` */ public class ConfigAdvanceInfo implements Serializa...
codereview_new_java_data_10947
public class EnvUtil { * customEnvironment. */ public static void customEnvironment() { - Boolean enableCustom = getProperty(NACOS_CUSTOM_ENVIRONMENT_ENABLED, Boolean.class); - if (Boolean.TRUE.equals(enableCustom)) { Set<String> propertyKeys = CustomEnvironmentPluginManager...
codereview_new_java_data_10948
public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo } } filterChain.doFilter(request, servletResponse); - if (threadLocalClientAttributes.get() != null) { - threadLocalClientAttributes.remove(); - } } ...
codereview_new_java_data_10949
public RestResult<Boolean> stopBeta(@RequestParam(value = "dataId") String dataI } ConfigChangePublisher.notifyConfigChange( new ConfigDataChangeEvent(true, dataId, group, tenant, System.currentTimeMillis())); - return RestResultUtils.success("remove beta ok", true); } ...
codereview_new_java_data_10950
class JvmArgsPropertySource extends AbstractPropertySource { - private final Properties properties = new Properties(System.getProperties()); @Override SourceType getType() { Why do this changes? I think the old way is ok and better. class JvmArgsPropertySource extends AbstractProperty...
codereview_new_java_data_10951
*/ public class BatchInstanceData implements Serializable { - private static final long serialVersionUID = 1L; private List<String> namespaces; use auto generator serialVersionUID. */ public class BatchInstanceData implements Serializable { + private static final long serialVersionU...
codereview_new_java_data_10953
*/ public class Member implements Comparable<Member>, Cloneable, Serializable { - private static final long serialVersionUID = 1L; private String ip; Why not generated auto by idea? */ public class Member implements Comparable<Member>, Cloneable, Serializable { + private sta...
codereview_new_java_data_10954
public EphemeralClientOperationServiceImpl(ClientManagerDelegate clientManager) } @Override - public void registerInstance(Service service, Instance instance, String clientId) { - try { - NamingUtils.checkInstanceIsLegal(instance); - } catch (NacosException e) { - ...
codereview_new_java_data_10955
protected void reconnect(final ServerInfo recommendServerInfo, boolean onRequest recommendServer.set(null); } - if (RpcClient.this.serverListFactory.getServerList().size() == 0) { throw new Exception("server list is empty"); ...
codereview_new_java_data_10956
public void onFailed(Throwable throwable) { if (null == throwable) { Loggers.DISTRO.info("[DISTRO-END] {} result: false", getDistroKey().toString()); } else { - Loggers.DISTRO.warn("[DISTRO] Sync data change failed. key: {}", getDistroKey(), throwable); ...
codereview_new_java_data_10957
class DefaultSettingPropertySource extends AbstractPropertySource { private static final Logger LOGGER = LoggerFactory.getLogger(DefaultSettingPropertySource.class); - private static final String DEFAULT_SETTING_PATH = "classpath:default_setting.properties"; private final Properties defa...
codereview_new_java_data_10958
public void batchRegisterService(String serviceName, String groupName, List<Inst NAMING_LOGGER.info("batchRegisterInstance instances: {} ,serviceName: {} begin.", instances, serviceName); if (CollectionUtils.isEmpty(instances)) { NAMING_LOGGER.warn("batchRegisterInstance instances is Emp...
codereview_new_java_data_10959
public static void checkInstanceIsLegal(Instance instance) throws NacosException public static void checkInstanceIsEphemeral(Instance instance) throws NacosException { if (!instance.isEphemeral()) { throw new NacosException(NacosException.INVALID_PARAM, - String.format("Ba...
codereview_new_java_data_10960
public String callServer(String api, Map<String, String> params, Map<String, Str } url = NamingHttpClientManager.getInstance().getPrefix() + curServer + api; } - try { HttpRestResult<String> restResult = nacosRestTemplate .exchangeFo...
codereview_new_java_data_10961
public void updateInstance(Service service, Instance instance, String clientId) request.setInstance(instance); request.setClientId(clientId); final WriteRequest writeRequest = WriteRequest.newBuilder() - .setGroup(Constants.NAMING_PERSISTENT_SERVICE_GROUP_V2) ...
codereview_new_java_data_10962
public void onDelete(String datumKey, RaftPeer source) throws Exception { @Override public void shutdown() throws NacosException { this.stopWork = true; - if (!initialized) { - return; - } this.raftStore.shutdown(); this.peers.shutdown(); Loggers.R...
codereview_new_java_data_10963
public class DistroConstants { public static final String DATA_LOAD_TIMEOUT_MILLISECONDS = "nacos.core.protocol.distro.data.load.timeoutMs"; - public static final long DEFAULT_DATA_LOAD_TIMEOUT_MILLISECONDS = 3000L; } default 3s maybe not enough. public class DistroConstants { ...
codereview_new_java_data_10964
public void close() { while (ORIGIN_SERVER.equals(rpc.getCurrentServer().getServerIp())) { TimeUnit.SECONDS.sleep(1); if (--retry < 0) { - Assert.fail("failed to auth switch server!"); } } No this PR content. public void close() { ...
codereview_new_java_data_11009
public AsyncExecutableHttpRequest prepareRequest(HttpRequest requestInfo) { } case "DELETE": { request = AsyncRequestBuilder.delete(uri); - setRequestEntity(requestInfo,request); break; } de...
codereview_new_java_data_11010
public MilestoneActivityBehavior createMilestoneActivityBehavior(PlanItem planIt } else if (StringUtils.isNotEmpty(milestone.getName())) { name = milestone.getName(); } - return new MilestoneActivityBehavior(expressionManager.createExpression(name), milestone.getMilestoneVariable(...
codereview_new_java_data_11011
protected BaseElement convert(XMLStreamReader xtr, ConversionHelper conversionHe TimerEventListener timerEventListener = (TimerEventListener) conversionHelper.getCurrentCmmnElement(); timerEventListener.setTimerStartTriggerStandardEvent(event); } else { - c...
codereview_new_java_data_11012
import org.flowable.bpmn.converter.util.BpmnXMLUtil; import org.flowable.bpmn.model.BaseElement; import org.flowable.bpmn.model.BpmnModel; -import org.flowable.bpmn.model.FlowableListener; import org.flowable.bpmn.model.HasScriptInfo; import org.flowable.bpmn.model.ScriptInfo; I think the import of `FlowableLi...
codereview_new_java_data_11013
import java.util.ArrayList; import java.util.List; -import java.util.Objects; import java.util.Optional; import com.fasterxml.jackson.annotation.JsonIgnore; I don't see `Objects` used in this class. import java.util.ArrayList; import java.util.List; import java.util.Optional; import com.fasterxml.ja...
codereview_new_java_data_11014
package org.flowable.engine.impl.bpmn.http.handler; import org.flowable.common.engine.api.FlowableIllegalStateException; import org.flowable.common.engine.api.delegate.Expression; import org.flowable.common.engine.api.variable.VariableContainer; import org.flowable.common.engine.impl.scripting.AbstractScriptEva...
codereview_new_java_data_11424
public boolean runRandomizer() { compositeDisposable.add(reviewHelper.getRandomMedia() .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(this::checkUsageOfMedia)); return true; } /** * Check whether...
codereview_new_java_data_11425
public boolean checkWhetherFileIsUsedInWikis() { } final int totalCount = fileUsages.size(); - int ignoreCount = 0; /* Ignore usage under https://commons.wikimedia.org/wiki/User:Didym/Mobile_upload/ which has been a gallery of all of our uploads since 2014 */ - ...
codereview_new_java_data_11426
private void updateNearbyNotification(@Nullable NearbyController.NearbyPlacesInf // Means that no close nearby place is found nearbyNotificationCardView.setVisibility(View.GONE); } - if(mediaDetailPagerFragment!=null && !contributionsListFragment.isVisible()) { ne...
codereview_new_java_data_11427
private void setUpRecentLanguagesSection(final List<Language> recentLanguages) { * @return a string without leading and trailing whitespace */ public String removeLeadingAndTrailingWhitespace(String source) { int firstNonWhitespaceIndex = 0; while (firstNonWhitesp...
codereview_new_java_data_11428
private void launchZoomActivityAfterPermissionCheck(final View view) { final Context ctx = view.getContext(); final Intent zoomableIntent = new Intent(ctx, ZoomableActivity.class); zoomableIntent.setData(Uri.parse(media.getImageUrl())); - zoomableIntent.putExtra("Origi...
codereview_new_java_data_11429
void placeSelected() { finish(); } /** - * Centre the camera on the last saved location */ private void addCenterOnGPSButton(){ fabCenterOnLocation = findViewById(R.id.centre_on_gps); fabCenterOnLocation.setOnClickListener(view -> getCentre()); } void getCe...
codereview_new_java_data_11430
import javax.inject.Inject; import javax.inject.Named; import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import timber.log.Timber; public class UploadMediaPresenter implements UserActionListener, SimilarImageInterface { Is this really needed? import javax.i...
codereview_new_java_data_11431
public String removeTrailingWhitespace(String source) { * @return a string with Latin spaces instead of Ideographic spaces */ public String convertIdeographicSpaceToLatinSpace(String source) { - Pattern JapSpacePattern = Pattern.compile("\\x{3000}"); - return JapSpace...
codereview_new_java_data_11432
public static String getWLMEndDate() { return "30 Sep"; } public static int getWikiLovesMonumentsYear(Calendar calendar) { int year = calendar.get(Calendar.YEAR); if (calendar.get(Calendar.MONTH) < Calendar.SEPTEMBER) { Would you mind writing a unit test for this? Thanks a lot! ...
codereview_new_java_data_11443
public class CommonsApplication extends MultiDexApplication { public static final String FEEDBACK_EMAIL_SUBJECT = "Commons Android App Feedback"; - public static final String REPORT_EMAIL = "commons-app-android@googlegroups.com"; public static final String REPORT_EMAIL_SUBJECT = "Report a violation"...
codereview_new_java_data_11444
private String getTechInfo(final Media media, final String type) { .append("\n\n") .append("Thank you for your report! Our team will investigate as soon as possible.") .append("\n") - .append("Please note that images also have `Nominate for deletion` button."); ...
codereview_new_java_data_11784
public final class ZMSConsts { public static final String DB_COLUMN_AS_DOMAIN_NAME = "domain_name"; public static final String DB_COLUMN_AS_ROLE_NAME = "role_name"; public static final String DB_COLUMN_AS_GROUP_NAME = "group_name"; - public static final String DB_COLUMN_AS_PRINCIPAL_NA...
codereview_new_java_data_11785
package com.yahoo.athenz.zms; import com.yahoo.rdl.Timestamp; we need to add copyright notice +/* + * Copyright The Athenz Authors + * + * 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 Lic...
codereview_new_java_data_11792
public void setFlattened(boolean flattened) { this.flattened = flattened; } public boolean isSynthetic() { return synthetic; } public void setSynthetic(boolean synthetic) { this.synthetic = synthetic; } Can we add some documentation here? public void setFlatte...
codereview_new_java_data_11793
import software.amazon.awssdk.utils.builder.ToCopyableBuilder; /** - * Interface for specifying a retry policy to use when evaluating whether or not a request should be retried , and the gap * between each retry. The {@link #builder()} can be used to construct a retry policy with numRetries and backoffStrategy. ...
codereview_new_java_data_11794
import software.amazon.awssdk.http.SdkHttpMethod; /** - * Class to parse the parameters to a SdkHttpRequest , make the call to the endpoint and send the HttpExecuteResponse * to the DefaultEc2Metadata class for further processing. */ @SdkInternalApi nit: space before comma import software.amazon.awssdk.ht...
codereview_new_java_data_11795
interface Builder { Builder addJson(String attributeName, String json); /** - * Appends an attribute of name attributeName with specified value of the give EnhancedDocument. * @param attributeName Name of the attribute that needs to be added in the Document. * @param enh...
codereview_new_java_data_11796
public String toString() { @Override public void close() { - if (profileFile instanceof SdkAutoCloseable) { - ((SdkAutoCloseable) profileFile).close(); - } // The delegate credentials provider may be closeable (eg. if it's an STS credentials provider). In this case, we sho...
codereview_new_java_data_11797
public void invokeInterceptorsAndCreateExecutionContext_multipleExecutionContext @Test public void invokeInterceptorsAndCreateExecutionContext_profileFileSupplier_storesValueInExecutionAttributes() { - HttpChecksum httpCrc32Checksum = HttpChecksum.builder().requestAlgorithm("crc32").isRequestStreami...
codereview_new_java_data_11798
void resolveToken_profileFileSupplier_suppliesObjectPerCall() { ProfileTokenProvider provider = ProfileTokenProvider.builder().profileFile(supplier).profileName("sso").build(); - try { - Mockito.when(supplier.get()).thenReturn(file1); - provider.resolveToken(); - ...
codereview_new_java_data_11799
public S3CrtRequestBodyStreamAdapter(SdkHttpContentPublisher bodyPublisher) { @Override public boolean sendRequestBody(ByteBuffer outBuffer) { return requestBodySubscriber.blockingTransferTo(outBuffer) == ByteBufferStoringSubscriber.TransferResult.END_OF_STREAM; } What thread is blocking h...
codereview_new_java_data_11800
public String toString() { * Method to return the number of retries allowed. * @return The number of retries allowed. */ - public int getNumRetries() { return numRetries; } /** * Method to return the BackoffStrategy used. * @return The backoff Strategy used. ...
codereview_new_java_data_11801
import java.util.Base64; import java.util.List; import java.util.regex.Pattern; -public enum Pem { - ; private static final String BEGIN_MARKER = "-----BEGIN "; private static final Pattern BEGIN = Pattern.compile("BEGIN", Pattern.LITERAL); /** * Returns the first private key that is fou...
codereview_new_java_data_11802
import java.util.Base64; import java.util.List; import java.util.regex.Pattern; -public enum Pem { - ; private static final String BEGIN_MARKER = "-----BEGIN "; private static final Pattern BEGIN = Pattern.compile("BEGIN", Pattern.LITERAL); /** * Returns the first private key that is fou...
codereview_new_java_data_11803
package software.amazon.awssdk.services.cloudfront.internal.auth; import java.util.Arrays; public enum PemObjectType { PRIVATE_KEY_PKCS1("-----BEGIN RSA PRIVATE KEY-----"), PRIVATE_KEY_PKCS8("-----BEGIN PRIVATE KEY-----"), internal annotation missing package software.amazon.awssdk.services.cloudfr...
codereview_new_java_data_11804
public interface SignedUrl { String url(); /** - * Generates an HTTP request that can be executed by an HTTP client to access the resource */ - SdkHttpRequest generateHttpRequest(); } For the documentation, please include that it's a GET request. Alternatively, we can rename the method to ...
codereview_new_java_data_11805
* small parts from a single object. The Transfer Manager is built on top of the Java bindings of the AWS Common Runtime S3 client * and leverages Amazon S3 multipart upload and byte-range fetches for parallel transfers. * - * <h1>Instantiate a Transfer Manager</h1> - * <b>Create a transfer manager with SDK defau...
codereview_new_java_data_11806
public interface Builder extends SdkHttpClient.Builder<ApacheHttpClient.Builder> Builder dnsResolver(DnsResolver dnsResolver); /** - * Configuration that defines a Socket Factory. If no matches are found, the default factory is used. */ Builder socketFactory(ConnectionSoc...
codereview_new_java_data_11807
@SdkPublicApi @SdkPreviewApi public final class ProxyConfiguration implements ToCopyableBuilder<ProxyConfiguration.Builder, ProxyConfiguration> { private final String scheme; private final String host; private final int port; private final String username; private final String password; ...
codereview_new_java_data_11808
void executeTestSuite(TestDiscovery.RulesTestcase testcase) { } private Stream<ValidationTestCase> validTestcases() { - TestDiscovery discovery = new TestDiscovery(); return TEST_DISCOVERY.getValidRules() .stream() - .map(name -> new Validatio...
codereview_new_java_data_11809
// TODO : Implement further functionality such as ToString, fromValue and Exception Handling as needed. public enum EndpointMode { - IPv4, - IPv6 } Enum should use all caps. IPV4, IPV6 // TODO : Implement further functionality such as ToString, fromValue and Exception Handling as needed. public enum En...
codereview_new_java_data_11814
protected boolean hasSerialHost(Record record) { protected String getSubfieldOrDefault(DataField field, char subfieldCode, String defaultValue) { Subfield subfield = field.getSubfield(subfieldCode); String data = subfield != null ? subfield.getData() : null; - return data == null ? defaul...
codereview_new_java_data_11842
public void onConnectionClose(MySQLResponseService service) { XAStateLog.saveXARecoveryLog(session.getSessionXaID(), service); } @Override public String getStage() { return COMMIT_STAGE; how to handle connectionError in ResponseHandler? public void onConnectionClose(MySQLResponseS...
codereview_new_java_data_11843
public String getConfigurationAsJsonString() { Map<String, String> propsAsStringMap = new HashMap<>(); configurationAsProperties.forEach((key, value) -> { - String strKey = Objects.toString(key); - if (SettingsApiServlet.haveKey(strKey)) { - String strValue = Objects.toString(value); - //do not a...
codereview_new_java_data_11844
public CoverArtArchiveResult(final boolean found, final Timestamp modified, fina this.cover = cover; } - public boolean isFounded() { return found; } Should be called `isFound` public CoverArtArchiveResult(final boolean found, final Timestamp modified, fina this.cover = cover; } + publi...
codereview_new_java_data_11845
public DLNAComplianceResult checkCompliance(ImageInfo imageInfo) { switch (this.toInt()) { case DLNAImageProfile.GIF_LRG_INT -> checkGIF(imageInfo, complianceResult); - case DLNAImageProfile.JPEG_LRG_INT, DLNAImageProfile.JPEG_MED_INT, DLNAImageProfile.JPEG_RES_H_V_INT, DLNAImageProfile.JPEG_SM_INT, DLNAIma...
codereview_new_java_data_11846
public String getResolutionForKeepAR(int scaleWidth, int scaleHeight) { private void setMetadataFromFileName(File file) { String absolutePath = file.getAbsolutePath(); if ( - file != null && absolutePath != null && - ( - Platform.isMac() && - // skip metadata extraction and API lookups for live p...
codereview_new_java_data_11847
public synchronized final void checkTables(boolean force) throws SQLException { // Files and metadata MediaTableMetadata.checkTable(connection); MediaTableFiles.checkTable(connection); - MediaTableVideoMetadatas.checkTable(connection); MediaTableSubtracks.checkTable(connection); MediaTableC...
codereview_new_java_data_11893
public class PopReviveService extends ServiceThread { private int queueId; private BrokerController brokerController; private String reviveTopic; - private volatile long currentReviveMessageTimestamp = -1; private volatile boolean shouldRunPopRevive = false; private final NavigableMap<Pop...
codereview_new_java_data_11894
void registerProcessor(final int requestCode, final NettyRequestProcessor proces boolean isChannelWritable(final String addr); - boolean isAddressCanConnect(final String addr); void closeChannels(final List<String> addrList); } Suggest rename it to "isAddressReachable" void registerProcessor(fin...
codereview_new_java_data_11895
public static TopicMessageType parseFromMessageProperty(Map<String, String> mess return TopicMessageType.DELAY; } else if (messageProperty.get(MessageConst.PROPERTY_SHARDING_KEY) != null) { return TopicMessageType.FIFO; - } else { - return TopicMessageType.NORMAL; ...
codereview_new_java_data_11896
public List<MessageExt> takeMessages(final int batchSize) { /** * Return the result that whether current message is exist in the process queue or not. */ - public boolean hasMessage(MessageExt message) { if (message == null) { // should never reach here. return fa...
codereview_new_java_data_11897
public class ResetOffsetRequestHeader implements CommandCustomHeader { private int queueId = -1; - @CFNotNull private Long offset; @CFNotNull The CFNotNull of offset is not necessary, and will produce WARN for old client public class ResetOffsetRequestHeader implements CommandCustomHeader { ...
codereview_new_java_data_11898
public RemotingCommand sendMessage(final ChannelHandlerContext ctx, if (Objects.equals(deletePolicy, DeletePolicy.COMPACTION)) { if (StringUtils.isBlank(msgInner.getKeys())) { response.setCode(ResponseCode.MESSAGE_ILLEGAL); - response.setRemark("the message don't h...
codereview_new_java_data_11899
package org.apache.rocketmq.common.attribute; public enum DeletePolicy { - NORMAL, COMPACTION } STANDARD may be more appropriate than NORMAL. package org.apache.rocketmq.common.attribute; public enum DeletePolicy { + DELETE, COMPACTION }
codereview_new_java_data_11900
public void setInBrokerContainer(boolean inBrokerContainer) { } private String defaultBrokerName() { - return localHostName == null ? "DEFAULT_BROKER" : localHostName; } public String getCanonicalName() { ```suggestion return StringUtils.isEmpty(localHostName) ? "DEFAULT_BROKER...
codereview_new_java_data_11901
public class BrokerReplicaInfo { private final String clusterName; private final String brokerName; - // Start from 2, because no.1 will be used when the instance is initiated private final AtomicLong nextAssignBrokerId; private final HashMap<String/*Address*/, Long/*brokerId*/> brokerIdTable; ...
codereview_new_java_data_11902
public static BrokerController createBrokerController(String[] args) { System.exit(-2); } - if (!nettyServerConfig.getBindIP().equals("0.0.0.0") && - !nettyServerConfig.getBindIP().equals(brokerConfig.getBrokerIP1())) { - System.out.printf("Broke...
codereview_new_java_data_11903
private void calcTimerDistribution() { Slot slotEach = timerWheel.getSlot(currTime + j * precisionMs); periodTotal += slotEach.num; } - LOGGER.info("{} period's total num: {}", timerDist.get(i), periodTotal); this.timerMetrics.updateDistPair(timerD...
codereview_new_java_data_11904
private void updateTopicSubscribeInfoWhenSubscriptionChanged() { */ public synchronized void subscribe(String topic, String subExpression, MessageQueueListener messageQueueListener) throws MQClientException { try { - if (topic == null || "".equals(topic)) { throw new Ill...
codereview_new_java_data_11905
public interface LitePullConsumer { /** * Offset specified by batch commit - * @param messageQueues * @param persist */ - void commitSync(Map<MessageQueue, Long> messageQueues, boolean persist); void commit(final Set<MessageQueue> messageQueues, boolean persist); The first par...
codereview_new_java_data_11906
public void assign(Collection<MessageQueue> messageQueues) { } @Override - public void setSubExpression4Assgin(final String topic, final String subExpresion) { - defaultLitePullConsumerImpl.setSubExpression4Assgin(withNamespace(topic), subExpresion); } @Override `setSubExpression4Ass...
codereview_new_java_data_11907
private static PutMessageResult transformTimerMessage(BrokerController brokerCon long deliverMs; try { if (msg.getProperty(MessageConst.PROPERTY_TIMER_DELAY_SEC) != null) { - deliverMs = System.currentTimeMillis() + Integer.parseInt(msg.getProperty(MessageConst.PROPERTY_TI...
codereview_new_java_data_11908
public RemotingClient getRemotingClient() { public String fetchNameServerAddr() { try { String addrs = this.topAddressing.fetchNSAddr(); - if (addrs != null && !UtilAll.isBlank(addrs)) { if (!addrs.equals(this.nameSrvAddr)) { log.info("name se...
codereview_new_java_data_11909
public long getMinOffsetInQueue() { } @Override - public void dispatch(DispatchRequest request) { final int maxRetries = 30; boolean canWrite = this.messageStore.getRunningFlags().isCQWriteable(); for (int i = 0; i < maxRetries && canWrite; i++) { No good to change this, just...
codereview_new_java_data_11910
public boolean parseDelayLevel() { @Override public void truncateDirtyLogicFiles(long phyOffset) { - this.consumeQueueStore.truncateDirtyFiles(phyOffset); } /** No good to change this too. public boolean parseDelayLevel() { @Override public void truncateDirtyLogicFiles(lon...
codereview_new_java_data_11970
private boolean isHostUnknown(String recipient) { } if (host_unknown) { - host_unknown = Trunking.isTrunkingEnabledFor(recipient); } return host_unknown; } I think this logic got inverted when the switch to SystemProperties happened ```suggestion if (h...
codereview_new_java_data_11971
private void processConnection(@Nonnull final HttpConnection connection, @Nonnul final HttpConnection openConnection = connectionQueue.peek(); assert openConnection != null; if (openConnection.getRequestId() > lastSequentialRequestID) { - break; // ...
codereview_new_java_data_11974
public class NodeFlags implements HasRoles { private String nodeImplementation = DEFAULT_NODE_IMPLEMENTATION; @Parameter( - names = {"--downloads-dir"}, description = "The default location wherein all browser triggered file downloads would be " + "available to be retrieved from. This is usually ...
codereview_new_java_data_11979
public Fixture() { originalDriver = mock(WebDriver.class); when(originalSwitch.alert()).thenReturn(original); when(originalDriver.switchTo()).thenReturn(originalSwitch); - decoratedDriver = new WebDriverDecorator().decorate(originalDriver); decorated = decoratedDriver.switchTo().alert(...
codereview_new_java_data_11990
/* - * (c) Copyright 2020 Palantir Technologies Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. ```suggestion * (c) Copyright 2022 Palantir Technologies Inc. All rights reserved. ``` /* + * (c...
codereview_new_java_data_11991
/* - * (c) Copyright 2017 Palantir Technologies Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. ```suggestion * (c) Copyright 2022 Palantir Technologies Inc. All rights reserved. ``` /* + * (c...
codereview_new_java_data_11992
severity = BugPattern.SeverityLevel.WARNING, summary = "The HashMap(int) and HashSet(int) constructors are misleading: once the HashMap/HashSet reaches 3/4" + " of the supplied size, it resize. Instead use Maps.newHashMapWithExpectedSize or" - + " Sets.newHashSetWithExpextedSi...
codereview_new_java_data_11993
summary = "Disallow usage of .collapseKeys() in EntryStream(s).") public final class DangerousCollapseKeysUsage extends BugChecker implements BugChecker.MethodInvocationTreeMatcher { private static final long serialVersionUID = 1L; - private static final String ERROR_MESSAGE = "The collapseKeys API o...
codereview_new_java_data_12041
public static PackageInfo getPackageInfo(PackageManager pm, String packageName) return InternalUtils.getPackageInfo(pm, packageName, 0); } - @SuppressWarnings("deprecation") public static PackageInfo getPackageInfo(PackageManager pm, String packageName, long flags) throws PackageManage...
codereview_new_java_data_12044
public static CapConfig loadFromAssets(Context context, String path) { * Constructs a Capacitor Configuration from config.json file within the app file-space. * * @param context The context. - * @param path A path relative to the root assets directory. * @return A loaded config file, if suc...
codereview_new_java_data_12045
public static CapConfig loadFromAssets(Context context, String path) { * Constructs a Capacitor Configuration from config.json file within the app file-space. * * @param context The context. - * @param path A path relative to the root assets directory. * @return A loaded config file, if suc...
codereview_new_java_data_12046
private void loadWebView() { } @SuppressLint("WebViewApiAvailability") - private boolean isMinimumWebViewInstalled() { PackageManager pm = getContext().getPackageManager(); // Check getCurrentWebViewPackage() directly if above Android 8 I think we should make this method public, in ...
codereview_new_java_data_12047
public Builder setServerUrl(String serverUrl) { return this; } - public Builder setErrorUPath(String errorPath) { this.errorPath = errorPath; return this; } ```suggestion public Builder setErrorPath(String errorPath) { ``` I think this is a ...
codereview_new_java_data_12099
private void doCleanup(String broker) throws ExecutionException, InterruptedExce log.info("Started ownership cleanup for the inactive broker:{}", broker); int orphanServiceUnitCleanupCnt = 0; long totalCleanupErrorCntStart = totalCleanupErrorCnt.get(); - var availableBrokers = new Has...
codereview_new_java_data_12100
/** * Defines the possible states for service units. * - * Refer to Service Unit State Channel in https://github.com/apache/pulsar/issues/16691 for additional details. */ public enum ServiceUnitState { ```suggestion * Refer to Service Unit State Channel in <a href="https://github.com/apache/pulsar/issues/...
codereview_new_java_data_12101
public interface StateChangeListener { - /** - * Stages of events currently supported. - * before starting the event/successful completion/failed completion. - */ - enum EventStage { - BEFORE, - SUCCESS, - FAILURE - } - /** * Handle the service unit state chang...
codereview_new_java_data_12102
public void initiate() { duplicateBuffer = payloadProcessorHandle.getProcessedPayload(); } } - this.dataLength = duplicateBuffer.readableBytes(); - this.ml.currentLedgerSize += (dataLength - originalDataLen); ledger.asyncAddEntry(dup...
codereview_new_java_data_12103
public void received(Consumer<T> consumer, Message<T> msg) { readerListener.received(MultiTopicsReaderImpl.this, msg); consumer.acknowledgeCumulativeAsync(messageId).exceptionally(ex -> { log.error("[{}][{}] auto acknowledge message {} cumulative fail....
codereview_new_java_data_12104
public static CompletionException wrapToCompletionException(Throwable throwable) } /** - * Creates a new {@link CompletableFuture} instance catching - * potential exceptions and completing the future exceptionally. * * @param runnable the runnable to execute * @param executor the...