id
stringlengths
23
26
content
stringlengths
182
2.49k
codereview_java_data_11726
Seq(NonTerminal(ul.childSort), Terminal(""), NonTerminal(Sort(ul.sort.name() + "#Terminator", ul.sort.params()))), newAtts.add(Constants.ORIGINAL_PRD, Production.class, ul.pList)); // Es ::= Ne#Es - prod4 = Production(Seq(), ul.sort, Seq(...
codereview_java_data_11727
} @Override - public ASTTypeExpression getRhs() { return (ASTTypeExpression) jjtGetChild(1); } /** Gets the wrapped type node. */ public ASTType getTypeNode() { - return getRhs().getTypeNode(); } @Override I'm not sure, if we should do that... We definitely don't n...
codereview_java_data_11730
return s; } char[] res = new char[length]; - for (int i = 0; i < s.length(); i++) { - res[i] = s.charAt(i); - } Arrays.fill(res, s.length(), length, ' '); return new String(res); } String#getChars probably faster than this loop ...
codereview_java_data_11733
// @formatter:off /** - * Returns the type of this node. The type of a declarator ID is * <ul> * <li>1. not necessarily the same as the type written out at the * start of the declaration, e.g. {@code int a[];} on this case however, the doc is actually useful as the relation b...
codereview_java_data_11739
log.trace("asyncReload called for key: {}", propCacheId); metrics.incrRefresh(); - return CompletableFuture.supplyAsync(() -> loadIfDifferentVersion(propCacheId, oldValue)); } @Override `supplyAsync` may use a jvm wide shared executor service. Seems like this can cause unrelated code in the JVM to i...
codereview_java_data_11740
} public CompletableFuture<SyncTarget> findSyncTarget() { - if (syncState.syncTarget().isPresent() && !syncState.isInSync()) { - return CompletableFuture.completedFuture(syncState.syncTarget().get()); - } - return selectNewSyncTarget(); } private CompletableFuture<SyncTarget> selectNewSyncTarg...
codereview_java_data_11742
} node.getPermissioningConfiguration() - .map(PermissioningConfiguration::getLocalConfig) - .map(Optional::get) .ifPresent( permissioningConfiguration -> { if (permissioningConfiguration.isNodeWhitelistEnabled()) { replace with `.flatMap(PermissioningConfigu...
codereview_java_data_11761
extends MergingSnapshotProducer<ReplacePartitions> implements ReplacePartitions { BaseReplacePartitions(String tableName, TableOperations ops) { super(tableName, ops); - set("replace-partitions", "true"); } @Override can we make `replace-partitions` property a static variable in `SnaphotSummary.j...
codereview_java_data_11773
public class ItunesTopListLoader { private final Context context; - String LOG = "ITunesTopListLoader"; public ItunesTopListLoader(Context context) { this.context = context; In other classes, we call this field TAG (and it's private static final) public class ItunesTopListLoader { private...
codereview_java_data_11782
if (suffix.isArguments() && prefix.getNumChildren() == 1 && prefix.getChild(0) instanceof ASTName) { ASTName name = (ASTName) prefix.getChild(0); return name.getImage().startsWith("StructuredArguments.") - || StringUtil.isAnyOf(name.getIm...
codereview_java_data_11783
return failOnArtifactWithNoMatchingSignature; } - public void seFailOnArtifactWithNoMatchingSignature( boolean failOnArtifactWithNoMatchingSignature ) { this.failOnArtifactWithNoMatchingSignature = failOnArtifactWithNoMatchingSignature; I think you meant `setFailOnArtifactWithNoMatchingSignature`...
codereview_java_data_11806
return fileStore != null && fileStore.isReadOnly(); } - public synchronized double getUpdateFailureRatio() { long updateCounter = this.updateCounter; long updateAttemptCounter = this.updateAttemptCounter; MVMap.RootReference rootReference = meta.getRoot(); why does this need...
codereview_java_data_11813
Tasks.range(readTasks.length) .stopOnFailure() - .executeWith(readTasksInitExecutorService) - .run(index -> { - readTasks[index] = new ReadTask<>( - scanTasks.get(index), tableBroadcast, expectedSchemaString, caseSensitive, - localityPreferred, new BatchRea...
codereview_java_data_11821
return getProject() .provider(() -> getProject().getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().stream() - .filter(ss -> !ss.getName().equals(IGNORE_MAIN_CONFIGURATION)) .map(SourceS...
codereview_java_data_11827
List<ExternalCompactionId> statusesToDelete = new ArrayList<>(); - Map<KeyExtent,TabletMetadata> tabletsMetadata = new HashMap<>(); - - List<KeyExtent> extents = - batch.stream().map(ecfs -> ecfs.getExtent()).collect(Collectors.toList()); - try (TabletsMetadata tablets = conte...
codereview_java_data_11838
return mProperties.getLong(name); } - public long getLong(String name, long defaultValue) { - return mProperties.getLong(name, defaultValue); - } - public String[] getStringArray(String name) { return mProperties.getStringArray(name); } I think you can remove this method n...
codereview_java_data_11850
pstmt = con.prepareStatement(INSERT_MESSAGE); ArchivedMessage message; int count = 0; while ((message = messageQueue.poll()) != null) { - pstmt.setInt(1, getArchivedMessageCount()); pstmt.setLong(2, message.getConversationID()); pstmt.setString(3, message.getFromJID().toBareJI...
codereview_java_data_11854
return this.constructDsl(streamDefinition.getDslText(), StreamDefinitionServiceUtils.sanitizeStreamAppDefinitions(this.getAppDefinitions(streamDefinition))); } - public static String unescape(String text) { return StringEscapeUtils.unescapeHtml(text); } public static method is probably not a good idea. r...
codereview_java_data_11868
package org.openqa.selenium.devtools.network.types; /** * Cookie object */ Consider extending Selenium's existing `Cookie` class. package org.openqa.selenium.devtools.network.types; +import java.util.Date; + /** * Cookie object */
codereview_java_data_11872
"The time to wait for a tablet server to process a bulk import request."), TSERV_MINTHREADS("tserver.server.threads.minimum", "20", PropertyType.COUNT, "The minimum number of threads to use to handle incoming requests."), - TSERV_MINTHREADS_ALLOW_TIMEOUT("tserver.server.thread.timeout.allowed", "true"...
codereview_java_data_11886
// This plugin interferes with gradles native annotation processor path configuration so need to configure - // it as well. project.getPluginManager().withPlugin("org.inferred.processors", processorsplugin -> project.getConfigurations() ...
codereview_java_data_11889
SpringDmnEngineConfigurator dmnConfigurator = context.getBean(SpringDmnEngineConfigurator.class); SpringFormEngineConfigurator formConfigurator = context.getBean(SpringFormEngineConfigurator.class); SpringIdmEngineConfigurator idmConfigurator = context.getBean(SpringIdmEngineConfi...
codereview_java_data_11890
return reflectiveSource(handler, handler.getDef().methods, handlerClass); } private static RelMetadataProvider reflectiveSource( final MetadataHandler target, final ImmutableList<Method> methods, final Class<? extends MetadataHandler<?>> handlerClass) { Why do we still need to rely on `handler...
codereview_java_data_11891
List<String> lines = IOUtils.readLines(new StringReader(result.content)); List<String> ips = new ArrayList<String>(lines.size()); for (String serverAddr : lines) { - if (null == serverAddr || serverAddr.trim().isEmpty()) { - ...
codereview_java_data_11893
final long now = System.currentTimeMillis(); - if (maybeOldRequestWithState.isPresent() && maybeOldRequestWithState.get().getRequest().isLongRunning()) { - requestManager.update(newRequest, maybeOldRequestWithState.get().getState(), maybeOldRequest.isPresent() ? RequestHistoryType.UPDATED : RequestHistoryT...
codereview_java_data_11898
break; } } - } catch (IOException ioe) { - /** - * Let the user continue composing their message even if we have a problem processing - * the source message. Log it as an error, though. - */ - Log.e(K9.LO...
codereview_java_data_11922
@Test public void leftHandAssignmentCanBeInBraces() { ParseResult<Expression> result = new JavaParser().parse(EXPRESSION, provider("(i) += (i) += 1")); - assertProblems(result); } } maybe "assertNoProblems" would be more intuitive in this case? @Test public void leftHandAssig...
codereview_java_data_11929
public String format() { return CsvFileFormat.FORMAT_CSV; } - - private static int[] createSimpleFieldMap(List<String> fieldList, String[] actualHeader) { - int[] res = new int[fieldList.size()]; - Arrays.fill(res, -1); - for (int i = 0; i < actualHeader.length; i++) { - ...
codereview_java_data_11975
String containerName = String.format("%s%s", configuration.getDockerPrefix(), taskProcess.getTask().getTaskId()); int possiblePid = dockerClient.inspectContainer(containerName).state().pid(); if (possiblePid == 0) { - LOG.warn(String.format("Container %s has pid 0. Running: (%s). Wil...
codereview_java_data_11978
} case UPPER_BOUND: case UPPER_WILDCARD: - case LOWER_WILDCARD: return new JavaTypeDefinitionSpecial(type, intersectionTypes); default: throw new IllegalStateException("Unknow type"); } who is using this new factory method? ...
codereview_java_data_11984
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - user = SAVED_USER; - } @Override How does this help? @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Ove...
codereview_java_data_11985
import javax.security.auth.login.LoginException; import javax.security.auth.spi.LoginModule; public class MyLoginModule implements LoginModule{ String password; Probably a type cast should be used here instead. If password can have different type also some more complicated code is required, because char arrays...
codereview_java_data_11987
* <pre>{@code * Pipeline pipeline = Pipeline.create(); * pipeline.<String>readFrom(Sources.list(LIST_NAME)) - * .mapUsingService(JetSpringServiceFactories.beanServiceFactory("userDao", UserDao.class), * (userDao, item) -> userDao.findByName(item.toLowerCase())) ...
codereview_java_data_11997
@Override public List<ASTAnyTypeBodyDeclaration> getDeclarations() { - return findChildrenOfType(ASTAnnotationTypeBody.class) - .get(0).findChildrenOfType(ASTAnyTypeBodyDeclaration.class); } } We could use `getFirstChildOfType` here. I think, we don't need to check for null, since eve...
codereview_java_data_12011
public void multipartSigned__shouldCallOpenPgpApiAsync() throws Exception { BodyPart signedBodyPart; Message message = messageFromBody( - multipart("signed", "application/pgp-signature", signedBodyPart = spy(bodypart("text/plain", "content")), ...
codereview_java_data_12012
); } finally { if (persisterSuccess.get()) { LOG.info( - "Request Persister: successful move to history ({} so far)", - lastPersisterSuccess.incrementAndGet() ); } Probably most helpful to set this to something like System.currentTimeMillis() that way we kn...
codereview_java_data_12031
SingularityDeployResult deployResult = getDeployResult(request, cancelRequest, pendingDeploy, updatePendingDeployRequest, deployKey, deploy, deployMatchingTasks, allOtherMatchingTasks, inactiveDeployMatchingTasks); - LOG.info("Deploy {} had result {} after {}", pendingDeployMarker, deployResult, JavaUtil...
codereview_java_data_12032
import java.io.IOException; import java.io.InputStream; import java.lang.reflect.Constructor; -import java.lang.reflect.Field; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.function.Function; import static com.hazelcast.jet.Traversers.traverseIterable; -import static com...
codereview_java_data_12039
} @GET - @Path("/singularity-limits-format") @Operation(summary = "Retrieve configuration data for Singularity") public SingularityLimits getSingularityLimits() { return new SingularityLimits(config.getMaxDecommissioningAgents()); Nitpick - can we change this to just `/singularity-limits`? } @...
codereview_java_data_12042
<h1>Error 503 Backend is unhealthy</h1> <p>Backend is unhealthy</p> <h3>Guru Mediation:</h3> - <p>Details: cache-sea4444-SEA 1645538750 1560503721</p> <hr> <p>Varnish cache server</p> </body> This line is part of every test. Might as well extract it to a `setUp()` method. <h1>Error...
codereview_java_data_12051
public class ASTAnnotationTypeDeclaration extends AbstractJavaAccessTypeNode implements ASTAnyTypeDeclaration { - QualifiedName qualifiedName; public ASTAnnotationTypeDeclaration(int id) { super(id); I'd declare this field `qualifiedName` private to hide it. Unless it really needs to be modified from...
codereview_java_data_12061
// These Text functions are safe, either because of what they accept or what they return. "begins", "br", "casesafeid", "contains", "find", "getsessionid", "ispickval", "len", // These Advanced functions are safe because of what they accept or what they return. - "curre...
codereview_java_data_12075
enum State { ACTIVE(0x00), AUTHORITY_FILTER_DISABLED(0x01), - AUTHORITY_SYSTEM_DISABLED(0x02); private final int principalState; State(int state) { somewhat confusing to call this bit as system disabled since the full attribute with combined bits is also called system di...
codereview_java_data_12082
@Test public void shouldReturnModifiedValuesMap() { - assertThat(HashMap.of(1, "1").put(2, "2").mapValues(Integer::parseInt)).isEqualTo(HashMap.of(1, 1).put(2, 2)); } // -- merge We can't use the concrete `HashMap.of` here because it is an abstract Map test, the base for _all_ Map implementa...
codereview_java_data_12099
PagedResources<MetricResource> list(/* TODO */); /** - * Delete the counter with given name */ void delete(String name); } "...with _the_ given name." <- ends with period for consistency PagedResources<MetricResource> list(/* TODO */); /** + * Delete the counter with given name. */ void delete(St...
codereview_java_data_12113
reconnectOften = !config.memory && config.big; testScript("testScript.sql"); testScript("derived-column-names.sql"); testScript("dual.sql"); testScript("indexes.sql"); I pushed a change that allows to set different expectations in different modes and fixed `joins.sql` with ...
codereview_java_data_12125
} final LazyKafkaWorkers kafkaWorkers; - private final Properties properties; - private AdminClient adminClient; KafkaCollector(Builder builder) { kafkaWorkers = new LazyKafkaWorkers(builder); I would change this to package specific access to reduce the size of the bytecode. } final LazyKafkaWor...
codereview_java_data_12130
private final ObjectMapper objectMapper; private final AsyncSemaphore<Response> webhookSemaphore; - private final ExecutorService webhookExecutorService; @Inject public SingularityWebhookSender(SingularityConfiguration configuration, AsyncHttpClient http, ObjectMapper objectMapper, TaskHistoryHelper taskHi...
codereview_java_data_12133
private void showFragment(Fragment fragment, String tag, Fragment otherFragment) { FragmentTransaction transaction = getChildFragmentManager().beginTransaction(); if (fragment.isAdded() && otherFragment != null) { - removeFragment(otherFragment); transaction.hide(otherFrag...
codereview_java_data_12136
* Displays a progress indicator. */ private void setLoadingLayout() { - binding.progressBar.setVisibility(View.VISIBLE); - binding.feedDisplay.setVisibility(View.GONE); } @Override `feedDisplay` is a strange name. I had to look at the xml file to find out what it actually is. H...
codereview_java_data_12149
protected File generatedResources; @Parameter(property = "kogito.codegen.persistence", defaultValue = "true") - protected String persistence; @Parameter(property = "kogito.codegen.rules", defaultValue = "true") protected String generateRules; ```suggestion protected String generatePersistence; `...
codereview_java_data_12150
@Before public void init() throws Exception { - Field field = MQClientInstance.class.getDeclaredField("brokerAddrTable"); - field.setAccessible(true); - field.set(mqClientInstance, brokerAddrTable); } @Test mockito and jmockit has native support for the reflection @Before...
codereview_java_data_12159
try { result = httpAgent.httpGet(path, headers, paramValues, encoding, readTimeoutMs); } catch (IOException e) { timer.observeDuration(); timer.close(); - throw e; } - timer.observeDuration(); - timer.close(); - return r...
codereview_java_data_12160
@Override public String toString() { - return "ParameterizedMetricKey{key=" + key.name() + ", version=" + options + '}'; } adjust also the string: version= -> options= @Override public String toString() { + return "ParameterizedMetricKey{key=" + key.name() + ", options=" + optio...
codereview_java_data_12169
.miningParameters(node.getMiningParameters()) .privacyParameters(node.getPrivacyParameters()) .nodePrivateKeyFile(KeyPairUtil.getDefaultKeyFile(node.homeDirectory())) - .metricsSystem(noOpMetricsSystem) .transactionPoolConfiguration(TransactionPoo...
codereview_java_data_12187
*/ public class LinearViewAnimator extends ViewAnimator { - Animation mUpInAnimation; - Animation mUpOutAnimation; - Animation mDownInAnimation; - Animation mDownOutAnimation; public LinearViewAnimator(Context context) { super(context); We don't prefix field names with "m" anymore. Also, m...
codereview_java_data_12188
return Uri.parse(BASE_URI.toString() + "/" + id); } - @Inject - Lazy<DBOpenHelper> dbOpenHelper; @Override public boolean onCreate() { Inconsistent line wrapping compared with other places where annotations are on the same line. return Uri.parse(BASE_URI.toString() + "/" + id); ...
codereview_java_data_12189
-//snippet-sourcedescription:[ListPipelineExecutions.java demonstrates how to all executions for a specific pipeline.] //snippet-keyword:[SDK for Java 2.0] //snippet-keyword:[Code Sample] //snippet-service:[AWS CodePipeline] "...demonstrates how to _blank_ all executions..." +//snippet-sourcedescription:[ListPipel...
codereview_java_data_12207
} private int countEntries(Iterable<Entry<Key,Value>> scanner) { - - int count = 0; - - for (Entry<Key,Value> keyValueEntry : scanner) { - count++; - } - - return count; } private void setRange(Range range, List<? extends ScannerBase> scanners) { I think this whole method could be replaced...
codereview_java_data_12216
this(null, modifiers, new NodeList<>(), new NodeList<>(), type, new SimpleName(name), parameters, new NodeList<>(), new BlockStmt(), null); } @AllFieldsConstructor public MethodDeclaration(final EnumSet<Modifier> modifiers, final NodeList<AnnotationExpr> annotations, final NodeList<TypeParameter...
codereview_java_data_12221
* Example: * <pre> * <code> - * List.unfold(10, x -> x == 0 * ? Option.none() - * : Option.of(new Tuple2<>(x, x-1))); * // List(10, 9, 8, 7, 6, 5, 4, 3, 2, 1)) * </code> * </pre> This seems to be the same as e.g. ``` java List.ofAll(Iterator.ite...
codereview_java_data_12222
import android.webkit.URLUtil; import org.apache.commons.io.FileUtils; -import org.shredzone.flattr4j.model.User; import org.xml.sax.SAXException; import java.io.File; This change (import org.shredzone.flatter4j.model.User;) does not seem relevant to this fix / commit. import android.webkit.URLUtil; import org....
codereview_java_data_12240
/** Local index value for when the class is not local. */ static final int NOTLOCAL_PLACEHOLDER = -1; - // Should we share that with ClassTypeResolver? - private static final PMDASMClassLoader CLASS_LOADER = PMDASMClassLoader.getInstance(JavaTypeQualifiedName.class.getClassLoader()); // since we pr...
codereview_java_data_12243
/** * Indicator that map is locked for update. */ - public final boolean semaphore; /** * Reference to the previous root in the chain. */ rather call this lockedForUpdate then, semaphore is a bit general (like calling a field "lock") :-) ...
codereview_java_data_12246
return LOCALHOST; } - private NodeRequests jsonRequestFactories() { Optional<WebSocketService> websocketService = Optional.empty(); if (nodeRequests == null) { final Web3jService web3jService; perhaps rename method as well, nodeRequestFactories? return LOCALHOST; } + private NodeReq...
codereview_java_data_12249
} MessageAndMetadata<byte[], byte[]> kafkaMessage = mIterator.next(); - Long timestamp = null; - if (mConfig.useKafkaTimestamp()) { - timestamp = mKafkaMessageTimestampFactory.create(mKafkaMessageTimestampClassName).getTimestamp(kafkaMessage); - } Message messa...
codereview_java_data_12259
protected View inflate(LayoutInflater layoutInflater, ViewGroup viewGroup) { View inflatedView = layoutInflater.inflate(R.layout.item_notification, viewGroup, false); ButterKnife.bind(this, inflatedView); - if (NotificationActivity.isarchivedvisible) { swipeLayout.setSwipeEnab...
codereview_java_data_12260
throw new UnsupportedOperationException("Identity transform is not supported"); } - default T bucket(int fieldId, String sourceName, int sourceId, int width) { - return bucket(sourceName, sourceId, width); } - default T bucket(String sourceName, int sourceId, int width) { throw new UnsupportedOpera...
codereview_java_data_12263
@SuppressLint("CheckResult") public void removeNotification(Notification notification) { - if(isRead) { return; } Disposable disposable = Observable.defer((Callable<ObservableSource<Boolean>>) Style: One space after `if` like in the similar lines you added as part of thi...
codereview_java_data_12270
CryptoEnvironment env = new CryptoEnvironment(Scope.RFILE, conf.getAllPropertiesWithPrefix(Property.TABLE_PREFIX)); FileEncrypter encrypter = cryptoService.getFileEncrypter(env); - String params = encrypter.getParameters(); ByteArrayOutputStream out = new ByteArrayOutputStream(); - OutputS...
codereview_java_data_12272
/* - * Copyright 2019 ConsenSys AG. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at FYI - copyright dates are usually left as the earliest date i.e. prior art /* + * Copyright 2018 Co...
codereview_java_data_12275
public void ethPeerIsMissingResultInNoUpdate() { when(ethPeers.peer(any())).thenReturn(null); - final SynchronizerUpdater updater = new SynchronizerUpdater(ethPeers); updater.updatePeerChainState(1, createAnonymousPeerConnection()); Should the `anyLong()` be `knownChainHeight`? ...unless any value is r...
codereview_java_data_12278
@Override public synchronized final long position() throws IOException { - return 0; } @Override Why that read() has to be under lock? We only need to protect usage of the "position" field (or even make it atomic instead) and let actual read() / write() concurrency to be taken care of by und...
codereview_java_data_12283
import android.text.util.Rfc822Tokenizer; public class Address implements Serializable { - private static final Pattern ATOM = Pattern.compile( - "^(?:[a-zA-Z0-9!#$%&'*+\\-/=?^_`{|}~]|\\s)+$"); /** * Immutable empty {@link Address} array Why the line break? import android.text.util.Rfc822T...
codereview_java_data_12299
import java.util.Arrays; -import static org.junit.Assert.assertTrue; /** * Unit test that verify the implementation of {@link ConnectionType} Could you change this into `assertEquals(expected, result)` ? import java.util.Arrays; +import static org.junit.Assert.assertEquals; /** * Unit test that verify the imp...
codereview_java_data_12300
required(102, "partition", partitionType), required(103, "record_count", LongType.get()), required(104, "file_size_in_bytes", LongType.get()), optional(105, "block_size_in_bytes", LongType.get()), optional(106, "file_ordinal", IntegerType.get()), optional(107, "sort...
codereview_java_data_12307
pathParameters( parameterWithName("my-task").description("The name of an existing task definition (required)")), requestParameters( - parameterWithName("cleanup").description("The flag to indicate if the associated task executions needed to be cleanedup") ) )); } cleanedup is 2 words. C...
codereview_java_data_12310
StringUtils.getParsedStringFromHtml(metadata.artist().value()) ); - media.setDescriptions(Collections.singletonMap("default", metadata.imageDescription().value())); media.setCategories(MediaDataExtractorUtil.extractCategoriesFromList(metadata.categories().value())); St...
codereview_java_data_12313
private void scheduleNextPull(PullResult pullResult) { pullRequest.setNextOffset(pullResult.getNextBeginOffset()); correctTagsOffset(pullRequest); - if (defaultMQPushConsumer.getPullInterval() > 0) { - executePullRequestLater(pullRequest, ...
codereview_java_data_12314
* constructor invocation}. */ @Nullable - public ASTExpression getLhsExpression() { - Node node = getFirstChild(); - return node instanceof ASTExpression ? (ASTExpression) node : null; } } In other nodes, we just called this `getLhs` (without "Expression" suffix). * const...
codereview_java_data_12316
} HashSet<String> filteredGroups = new HashSet<String>(); - for (String group : groups) { - if (this.brokerController.getSubscriptionGroupManager().getSubscriptionGroupTable().containsKey(group)) { - filteredGroups.add(group); } } GroupLi...
codereview_java_data_12325
runtimeEnvironment.setAppDeployer(deployerInfo); } catch (UnsupportedOperationException uoe) { - logger.debug("expected in skipper mode due to #392"); } } This message can be generic as there could be other modes in the future. Maybe we don't need to specify Skipper's 392 here. runtimeEnvironm...
codereview_java_data_12327
= new SimpleHeaderMarshaller<>(JsonProtocolMarshaller.INSTANT_VALUE_TO_STRING); public static final JsonMarshaller<List<?>> LIST = (list, context, paramName, sdkField) -> { - if (list.isEmpty()) { return; } SdkField memberFieldInfo = sdkField.getRequiredTrait(ListTrai...
codereview_java_data_12330
} // no arg constructor should do minimal work since its used in Main ServiceLoader - public Shell() throws IOException {} public Shell(ConsoleReader reader) { super(); Can remove the `throws IOException` as it won't affect callers at all. They were already expecting the IOException -- if we don't throw...
codereview_java_data_12332
public static class GroupCommitRequest { private final long nextOffset; - private final CountDownLatch countDownLatch = new CountDownLatch(1); - private CompletableFuture<Boolean> flushOk = new CompletableFuture<>(); private final long startTimestamp = System.currentTimeMillis(); ...
codereview_java_data_12367
* criteria as {@link #valueMatchesType}. */ public static boolean validConstant(Object o, Litmus litmus) { if (o == null || o instanceof Boolean || o instanceof BigDecimal || o instanceof NlsString It seems that this method is only used in tests ? * criteria as {@link #value...
codereview_java_data_12376
*/ private String getTemplatizedCreatedDate() { if (dateCreated != null) { if (UploadableFile.DateTimeWithSource.EXIF_SOURCE.equals(dateCreatedSource)) { - java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat("yyyy-MM-dd"); return String...
codereview_java_data_12380
return; } String notificationTag = localUri.toString(); - File file1 =new File(localUri.getPath()); Timber.d("Before execution!"); curNotification.setContentTitle(getString(R.string.upload_progress_notification_title_start, contribution.getDisplayTitle())) ...
codereview_java_data_12384
network.disconnect(this, Optional.ofNullable(reason)); } @Override public SocketAddress getLocalAddress() { throw new UnsupportedOperationException(); Should we push Optional<DisconnectReason> into PeerConnection? An alternative would be to make a no-args disconnect() and make disconnect(@...
codereview_java_data_12389
TableConfiguration tableConf = this.master.getContext().getTableConfiguration(tableId); MergeStats mergeStats = mergeStatsCache.computeIfAbsent(tableId, - k -> currentMerges.getOrDefault(k, new MergeStats(new MergeInfo()))); TabletGoalState goal = this.master.getGoalState(t...
codereview_java_data_12400
*/ public abstract class FeedPreferenceSkipDialog extends AlertDialog.Builder { - public FeedPreferenceSkipDialog(Context context, int titleRes, int skipIntroInitialValue, int skipEndInitialValue) { super(context); - setTitle(titleRes); View rootView = Vie...
codereview_java_data_12404
} @Ignore @Test public void testSavingsAccount_DormancyTracking() throws InterruptedException { this.savingsAccountHelper = new SavingsAccountHelper(this.requestSpec, this.responseSpec); remove this from this PR, and rebase from master, you'll get it from #761 ... } @Ignore ...
codereview_java_data_12408
combiners = new ColumnSet(Lists.newArrayList(Splitter.on(",").split(encodedColumns))); isPartialCompaction = ((env.getIteratorScope() == IteratorScope.majc) && !env.isFullMajorCompaction()); - if (options.containsKey(DELETE_HANDLING_ACTION_OPTION)) { - deleteHandlingAction = DeleteHandlingAction.value...
codereview_java_data_12414
@Override public boolean saveToSnapshot() { if (inComplete) { return complete(); } if (snapshotTraverser == null) { this needs more explanation, like in SessionWindowP. Do we perhaps need better support for this in ProcessorTasklet? @Override public boolean ...
codereview_java_data_12424
public static final String PUBLISHED_WAP_ID_PROP = "published-wap-id"; public static final String SOURCE_SNAPSHOT_ID_PROP = "source-snapshot-id"; public static final String REPLACE_PARTITIONS_PROP = "replace-partitions"; - public static final String EXTRA_METADATA_PREFIX = "extra-metadata."; private Snapsh...
codereview_java_data_12428
import java.util.Map; import static org.assertj.core.api.Assertions.assertThat; public class CsvFileFormatTest extends BaseFileFormatTest { We could use a test, proving that _projection_ works. import java.util.Map; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.util.Li...
codereview_java_data_12429
import com.hazelcast.jet.core.ProcessorSupplier; import com.hazelcast.jet.core.processor.Processors; import org.elasticsearch.client.RestClient; -import org.elasticsearch.client.RestHighLevelClient; import javax.annotation.Nonnull; -import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Coll...
codereview_java_data_12435
SendMessageContext sendMessageContext, ChannelHandlerContext ctx, int queueIdInt) { - ...
codereview_java_data_12440
*/ package org.kie.kogito.tracing.event.message.models; import org.kie.kogito.tracing.event.message.Message; import org.kie.kogito.tracing.event.message.MessageCategory; import org.kie.kogito.tracing.event.message.MessageExceptionField; Shouldn't `type` be hard-coded as a literal as it's used to determine the su...
codereview_java_data_12443
} byte[] bytes = createGIFFromImages(bitmaps); File file = new File(Environment.getExternalStorageDirectory() + "/" + "Phimpme_gifs"); - DateFormat dateFormat = new SimpleDateFormat("dMMyy_HHmm"); String date = dateFormat.format(Calendar.getInstance().getTi...