id
stringlengths
23
26
content
stringlengths
182
2.49k
codereview_java_data_2985
+ "SELECT " + KEY_USERNAME + "," + KEY_PASSWORD + " FROM " + TABLE_NAME_FEED_ITEMS + " INNER JOIN " + TABLE_NAME_FEEDS + " ON " + TABLE_NAME_FEED_ITEMS + "." + KEY_FEED + " = " + TABLE_NAME_FEEDS + "." + KEY_ID - + " WHERE " + TABLE_NAME_FEED_ITEMS + "."...
codereview_java_data_2988
} @SuppressWarnings("deprecation") @Test public void testAnnotations() { assertTrue(Property.TABLE_VOLUME_CHOOSER.isExperimental()); Rather than suppress warnings across the entire method, it's better to only suppress the one case in the method that is deprecated. This avoids masking future un-triaged...
codereview_java_data_2990
.inc(); } else { outboundMessagesCounter - .labels("null", Integer.toString(message.getCode()), Integer.toString(message.getCode())) .inc(); } Messages with no capability would be one of the ones from `WireMessageCodes` so maybe could add a message name function there an...
codereview_java_data_2995
import com.nimbusds.jose.JOSEException; import com.nimbusds.jose.JWSAlgorithm; import com.nimbusds.jose.RemoteKeySourceException; -import com.nimbusds.jose.jwk.*; import com.nimbusds.jose.jwk.source.JWKSetCache; import com.nimbusds.jose.jwk.source.JWKSource; import com.nimbusds.jose.jwk.source.RemoteJWKSet; Plea...
codereview_java_data_3001
this.getRemoteRepositories())); } properties.put(MAVEN_PREFIX + "offline", String.valueOf(this.isOffline())); - if (this.getConnectTimeout() > 0) { properties.put(MAVEN_PREFIX + "connectTimeout", String.valueOf(this.getConnectTimeout())); } - if (this.getRequestTimeout() > 0) { properties.put(M...
codereview_java_data_3005
return CheckResult.OK; } - public String name() { - String name = this.getClass().getSimpleName(); - return name.replace("AutoValue_", ""); - } - /** * Closes any network resources created implicitly by the component. * please revert this method as it is adding a public method to a base type...
codereview_java_data_3012
return put(entry._1, entry._2); } - @Override - public LinkedHashMap<K, V> put(java.util.Map<? extends K, ? extends V> map) { - Objects.requireNonNull(map, "map is null"); - LinkedHashMap<K, V> result = LinkedHashMap.empty(); - for (java.util.Map.Entry<? extends K, ? extends V> ...
codereview_java_data_3016
public abstract class MemberChangeListener extends Subscriber<MembersChangeEvent> { @Override - public Class<? extends Event> subscribeType() { return MembersChangeEvent.class; } Under the final modification public abstract class MemberChangeListener extends Subscriber<MembersChangeEvent> { ...
codereview_java_data_3038
/** * Database setting <code>IGNORE_CATALOGS</code> * (default: false).<br /> - * ignore Catalog-Prefix at object-Names. */ public final boolean ignoreCatalogs = get("IGNORE_CATALOGS", false); Please, use normal spelling and punctuation here. Also the description should be more correct,...
codereview_java_data_3039
* @param file The file to upload. * @param metadata The S3 metadata to associate with this object * @param cannedAcl The canned ACL to associate with this object - * @param connectionCheckType Type of connection check. Default is {@link NetworkInfoReceiver.Type#WIFI_ONLY} * @return A Transfe...
codereview_java_data_3047
return this; } - public ConfigBuilder select(String[] columns) { - conf.setStrings(COLUMN_PROJECTIONS, columns); return this; } Could we use a `List` instead of an array of strings here? It's usually easier if Iceberg converts to an array instead of expecting the caller to. retu...
codereview_java_data_3054
.map(tasklet -> taskletInitExecutor.submit(() -> Util.doWithClassLoader(jobClassLoader, tasklet::init))) .collect(toList()); - for (Future<?> future : futures) { - try { - future.get(); - } catch (InterruptedException...
codereview_java_data_3058
wl2.setUpdateTime(Timestamp.fromMillis(123456789123L)); wl2.setHostname("random"); wl2.setHostname("testhost-1"); assertEquals(wl1, wl2); we seem to be missing test cases here. After you set random, you need to verify that assertNotEquals(wl1, wl2); then you set the value to null, a...
codereview_java_data_3062
private final TaskSanitizer taskSanitizer = new TaskSanitizer(); - private static final List<String> allowedSorts = Arrays.asList("TASK_EXECUTION_ID", "TASK_NAME", "START_TIME", - "END_TIME", "EXIT_CODE"); /** * Creates a {@code TaskExecutionController} that retrieves Task Execution information In SCT, I vali...
codereview_java_data_3063
} private String createComposedTaskDefinition(String graph) { - String composedTaskDefinition = StringUtils.hasText(this.dataFlowUri) ? "%s --graph=\"%s\" --dataFlowUri=%s" : "%s --graph=\"%s\""; - return String.format(composedTaskDefinition, - taskConfigurationProperties.getComposedTaskRunnerName(), graph, th...
codereview_java_data_3071
final JsonObject respBody = new JsonObject(body); final String token = respBody.getString("token"); assertThat(token).isNotNull(); - System.out.println("token " + token); websocketService .aut...
codereview_java_data_3075
if (currRange != null || lmi.hasNext()) { // merge happened after the mapping was generated and before the table lock was acquired throw new AcceptableThriftTableOperationException(tableId, null, TableOperation.BULK_IMPORT, - TableOperationExceptionType.OTHER, Constants.BULK_CONCURRENT_MERGE...
codereview_java_data_3079
this.applyS3StorageClassAfterBytes = applyS3StorageClassAfterBytes; this.checkSubdirectories = checkSubdirectories.orElse(false); this.compressBeforeUpload = compressBeforeUpload.orElse(false); - this.checkIfOpen = checkIfOpen.orElse(false); } @Schema(description = "The name of the file") shoul...
codereview_java_data_3081
* @since 2.0.0 */ public interface IteratorConfiguration { - public String getIteratorClass(); - public String getName(); - public int getPriority(); Map<String,String> getOptions(); } `public` is redundant in all methods of this interface * @since 2.0.0 */ public interface IteratorConfiguration { + ...
codereview_java_data_3096
import com.google.errorprone.BugPattern.SeverityLevel; import com.google.errorprone.VisitorState; import com.google.errorprone.bugpatterns.BugChecker; -import com.google.errorprone.fixes.SuggestedFix; import com.google.errorprone.matchers.Description; import com.google.errorprone.matchers.Matcher; import com.goog...
codereview_java_data_3099
private long getNumInstancesWithAttribute(List<SingularityTaskId> taskIds, String attrKey, String attrValue) { return taskIds.stream() - .map(id -> slaveManager.getSlave(taskManager.getTask(id).get().getMesosTask().getSlaveId().getValue()).get().getAttributes().get(attrKey)) .filter(Objects::non...
codereview_java_data_3104
Integer.toString(mvStore.getFillRate())); add(rows, "info.CHUNKS_FILL_RATE", Integer.toString(mvStore.getChunksFillRate())); - long size; try { - size = f...
codereview_java_data_3107
eq( new EthereumWireProtocolConfiguration( 13, - EthereumWireProtocolConfiguration.DEFAULT_MAX_GET_BLOCK_BODIES.getValue(), - EthereumWireProtocolConfiguration.DEFAULT_MAX_GET_RECEIPTS.getValue(), - EthereumWireP...
codereview_java_data_3111
assertThat(dataObj.getName()).isEqualTo("LongTest"); assertThat(dataObj.getItemSubjectRef().getStructureRef()).isEqualTo("xsd:long"); assertThat(dataObj.getValue()).isInstanceOf(Long.class); - assertThat(dataObj.getValue()).isEqualTo((long) -123456); assertThat(dataObj.getExte...
codereview_java_data_3113
* @since 1.7.0 * @see #setBatchScan(Job, boolean) */ - protected static boolean isBatchScan(JobContext context) { - return InputConfigurator.isIsolated(CLASS, context.getConfiguration()); } /** Why JobContext here? And why not public? * @since 1.7.0 * @see #setBatchScan(Job, boolean) ...
codereview_java_data_3130
@Test public void shouldAppendElementToNil() { - final Seq<Integer> actual = this.<Integer>empty().append(1); final Seq<Integer> expected = of(1); assertThat(actual).isEqualTo(expected); } @Test public void shouldAppendNullElementToNil() { - final Seq<Integer> ac...
codereview_java_data_3135
int selected = UserPreferences.getFeedFilter(); String[] entryValues = context.getResources().getStringArray(R.array.nav_drawer_feed_filter_values); for (int i = 0; i < entryValues.length; i++) { - if (Integer.parseInt(entryValues[i]) == selected) selectedIndexTemp...
codereview_java_data_3150
@ParameterizedTest @MethodSource("org.kie.kogito.codegen.api.utils.KogitoContextTestUtils#contextBuilders") public void givenADMNModelWhenMonitoringIsActiveThenGrafanaDashboardsAreGenerated(KogitoBuildContext.Builder contextBuilder) throws Exception { - List<GeneratedFile> dashboards = generateTes...
codereview_java_data_3157
return true; } - private boolean validateDistinctAuthors( final Collection<SignedData<RoundChangePayload>> roundChangeMsgs) { final long distinctAuthorCount = roundChangeMsgs.stream().map(SignedData::getAuthor).distinct().count(); You can name this with the negation in the title (negate t...
codereview_java_data_3177
for(Range r: extentRanges.getValue()) clippedRanges.add(ke.clip(r)); BatchInputSplit split = new BatchInputSplit(tableName, tableId, clippedRanges, new String[] {location}); - split.setMockInstance(mockInstance); - split.setFetchedColumns(tableConfig.getFet...
codereview_java_data_3188
* with regards to the expected schema, while RuleBuilder validates the semantics. * * @param ruleElement The rule element to parse - * @param resourceLoader The resource loader to load the rule from jar * * @return A new instance of the rule described by this element * @throws Il...
codereview_java_data_3199
private static final Logger LOG = LogManager.getLogger(); private static List<String> nodeWhitelist; public NodeWhitelistController(final PermissioningConfiguration configuration) { nodeWhitelist = new ArrayList<>(); if (configuration != null && configuration.getNodeWhitelist() != null) { node...
codereview_java_data_3204
} public boolean isForceTextMessageFormat() { - if (!cryptoEnablePgpInline) { return false; } - - ComposeCryptoStatus cryptoStatus = getCurrentCryptoStatus(); - return cryptoStatus.isEncryptionEnabled() || cryptoStatus.isSigningEnabled(); } public b...
codereview_java_data_3211
<h1>Error 503 Backend is unhealthy</h1> <p>Backend is unhealthy</p> <h3>Guru Mediation:</h3> - <p>Details: cache-sea4446-SEA 1645538751 755287279</p> <hr> <p>Varnish cache server</p> </body> "wWith " -> "with" <h1>Error 503 Backend is unhealthy</h1> <p>Backend is unhealthy</p>...
codereview_java_data_3215
final FeedItem feedItem = getFeedItem(media); // some options option requires FeedItem switch (item.getItemId()) { case R.id.add_to_favorites_item: - if(feedItem != null) { DBWriter.addFavoriteItem(feedItem); ...
codereview_java_data_3221
public class ZooReader { private static final Logger log = LoggerFactory.getLogger(ZooReader.class); - public static final RetryFactory DEFAULT_RETRY_FACTORY = Retry.builder().maxRetries(10) .retryAfter(250, MILLISECONDS).incrementBy(250, MILLISECONDS).maxWait(5, TimeUnit.SECONDS) .backOffFactor(1.5)...
codereview_java_data_3225
package com.hazelcast.jet.examples.cdc; import com.hazelcast.jet.Jet; import com.hazelcast.jet.cdc.CdcSinks; import com.hazelcast.jet.cdc.ChangeRecord; import com.hazelcast.jet.cdc.mysql.MySqlCdcSources; should there a be a .`join()` call here? package com.hazelcast.jet.examples.cdc; import com.hazelcast.jet.J...
codereview_java_data_3237
} } - @Deprecated public Date getSessionCredentitalsExpiration() { credentialsLock.readLock().lock(); try { ```suggestion @Deprecated Use {@link #getSessionCredentialsExpiration()} instead. ``` } } + @Deprecated Use {@link #getSessionCredentialsExpiration()} in...
codereview_java_data_3238
package net.sourceforge.pmd.lang.java.typeresolution; import java.lang.reflect.Method; import java.util.List; import net.sourceforge.pmd.lang.java.typeresolution.typedefinition.JavaTypeDefinition; any reason for these fields not being final / `argTypes` an unmodifiable list? package net.sourceforge.pmd.lang.java...
codereview_java_data_3241
* }</pre> * * @param createSnapshotFn a function to create an object to store in the - * state snapshot. It must be stateless * @param <S> type of the snapshot object * * @since 3.1 ```suggestion * state snapshot. It must be stateless. ``` ...
codereview_java_data_3251
public class ConcurrentDeleteTableIT extends AccumuloClusterHarness { - @Test(timeout = 3 * 60 * 1000) public void testConcurrentDeleteTablesOps() throws Exception { try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) { String[] tables = getUniqueNames(2); In the super class, ...
codereview_java_data_3261
} public Object visit(ASTFieldDeclaration node, Object data) { - List<Modifier> unnecessary = new ArrayList<>(); if (node.isSyntacticallyPublic()) { unnecessary.add(Modifier.PUBLIC); } possibly better to use an `EnumSet<Modifier>` both for performance and avoiding duplic...
codereview_java_data_3270
if (!CastManager.isInitialized()) { return; } } Why was this line removed? Isn't the whole `onPause` function useless now? if (!CastManager.isInitialized()) { return; } + castButtonVisibilityManager.setResumed(false); }
codereview_java_data_3272
* * @return */ - Map<String, DataVersion> getAclConfigVersion(); /** * Update globalWhiteRemoteAddresses in acl yaml config file It makes the interface incompatible to older versions, you'd better add a new method and deprecate the original ones. * * @return */ + @...
codereview_java_data_3290
} @Test - public void testPartitionsTableScan() throws IOException { - - // Make 4 Manifests table.newFastAppend() .appendFile(FILE_PARTITION_0) .commit(); I haven't looked very closely, but this appears to be a really long test. My guess is that you're mixing test cases that should be...
codereview_java_data_3292
this.snsClient = AmazonSNSClientBuilder.defaultClient(); } this.webhookManager = webhookManager; - this.publishExecutor = managedCachedThreadPoolFactory.get("webhook-publish", configuration.getMaxConcurrentWebhooks()); this.typeToArn = new ConcurrentHashMap<>(); } Leaving a note here to dou...
codereview_java_data_3305
int retries = context.getConfiguration().getCount(Property.TSERV_BULK_RETRY); if (retries == 0) { - log.warn("Retries set to 0. All failed map file assignments will not be retried."); completeFailures.putAll(assignmentFailures); } else { for (Entry<Path,List<KeyExtent>> ent...
codereview_java_data_3312
private String brokerAddr; - private Map<String, DataVersion> aclConfigDataVersion; private String clusterName; Add a new field other than changing it for compatibility. private String brokerAddr; + @Deprecated + private DataVersion aclConfigDataVersion; + + private Map<String, DataVersion>...
codereview_java_data_3317
if ((messageRecord.isPending() || messageRecord.isFailed()) && pushDestination && !messageRecord.isForcedSms()) { background = SENT_PUSH_PENDING; triangleBackground = SENT_PUSH_PENDING_TRIANGLE; - } else if (messageRecord.isPending() || messageRecord.isPendingSmsFallback())...
codereview_java_data_3321
} @VisibleForTesting - P2PNetwork getP2PNetwork() { - return networkRunner.getNetwork(); } } It's quite unfortunate to have to expose the whole `P2PNetwork`. Is it possible for this to only return the local enode (via delegation)? } @VisibleForTesting + Optional<EnodeURL> getLocalEnode() { + r...
codereview_java_data_3330
private boolean checkAccount(){ Account currentAccount = sessionManager.getCurrentAccount(); if (currentAccount == null) { - Timber.d("Current account is null"); ViewUtil.showLongToast(this, getResources().getString(R.string.user_not_logged_in)); sessionManage...
codereview_java_data_3332
} callback.onSet(connection, response, info, statement, System.nanoTime() - startTime); // if the response from the server has warnings, they'll be set on the ExecutionInfo. Log them - // here, if enabled. - if (logger.isWarnEnabled() - && response.warnings != null - && ...
codereview_java_data_3335
ops.current().snapshot(snapshotId) : ops.current().currentSnapshot(); // snapshot could be null when the table just gets created - Iterable<ManifestFile> manifests = (snapshot != null) ? snapshot.manifests() : CloseableIterable.empty(); - CloseableIterable<ManifestEntry> entries = new Manife...
codereview_java_data_3337
String iconColor = localNotification.getIconColor(); if (iconColor != null) { - mBuilder.setColor(Color.parseColor(iconColor)); } createActionIntents(localNotification, mBuilder); this crash if the color is not valid, put it inside a try catch (check other plugins like Browser or Statusbar) ...
codereview_java_data_3344
public Optional<Collection<RoundChange>> appendRoundChangeMessage(final RoundChange msg) { if (!isMessageValid(msg)) { - LOG.debug("RoundChange message was invalid."); return Optional.empty(); } Why is an invalid RoundChange debug, but an invalid Proposal an info? (see IbftBlockHeightManager) ...
codereview_java_data_3346
private long id; private long distance; - public long getId() { return this.id; } public void setId(long id) { this.id = id; } - public long getDistance() { return this.distance; } public void setDistance(long distance) { this.distance = distance; } Lets not have getters and setters, but instead just mak...
codereview_java_data_3358
import android.app.Activity; import android.content.Context; import android.support.v4.view.PagerAdapter; -import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; Minor nitpick but should have space between casting of `context` i.e. `(Activity) contex...
codereview_java_data_3365
JobResult jobResult = new JobResult(jobId, config, coordinator, creationTime, completionTime, error != null ? error.toString() : null); - JobMetrics prevMetrics = jobMetrics.putIfAbsent(jobId, terminalMetrics); if (prevMetrics != null) { - logger.warning("Overwrote j...
codereview_java_data_3375
@Test public void printClassWithoutJavaDocButWithComment() { - String code = "/** javadoc */ public class A { \n// stuff\n}"; CompilationUnit cu = JavaParser.parse(code); PrettyPrinterConfiguration ignoreJavaDoc = new PrettyPrinterConfiguration().setPrintJavaDoc(false); Strin...
codereview_java_data_3376
final String fileType = tika.detect(tikaInputStream); final String fileExtension = Files.getFileExtension(fileDetail.getFileName()).toLowerCase(); ImportFormatType format = ImportFormatType.of(fileExtension); - if (!fileType.contains("msoffice")) { ...
codereview_java_data_3382
" Validate.notEmpty(mapArg, \"message %s %s\", \"msg\", \"msg\");", " Validate.notEmpty(stringArg, \"message %s %s\", \"msg\", \"msg\");", " Validate.notBlank(stringArg, \"message %s %s\", \"msg\", \"msg\");", - "...
codereview_java_data_3408
} catch (Exception e) { } System.out.printf("%-32s %-32s %-4d %-20d %-20d %-20s %-20d %s%n", UtilAll.frontStringAtLeast(mq.getTopic(), 32), UtilAll.frontStringAtLeast(mq.getBrokerName(), 32), ...
codereview_java_data_3415
import org.apache.accumulo.core.client.lexicoder.Lexicoder; import org.apache.accumulo.core.client.rfile.RFile; /** * Entry point for majority of Accumulo's public API. Other Accumulo API entry points are linked * later. Later? Could say linked below. import org.apache.accumulo.core.client.lexicoder.Lexicoder...
codereview_java_data_3419
package com.alibaba.nacos.naming.push; -import org.apache.commons.lang3.StringUtils; import org.codehaus.jackson.Version; import org.codehaus.jackson.util.VersionUtil; It can be replace by self StringUtils package com.alibaba.nacos.naming.push; +import com.alibaba.nacos.common.utils.StringUtils; import org.codeh...
codereview_java_data_3423
void subscribe(final String topic, final String subExpression) throws MQClientException; /** * Subscribe some topic * * @param fullClassName full class name,must extend org.apache.rocketmq.common.filter. MessageFilter Please describe the reason of why this API should be deprecated, and list...
codereview_java_data_3424
}); } public boolean update(Member newMember, ObjectEqual<Member> objEqual) { Loggers.CLUSTER.debug("member information update : {}", newMember); Please do not change the indent. Please use nacos codestyle to reformat your change. detail see source code `style/nacosCodeStyle.md.` ...
codereview_java_data_3431
import org.jbpm.process.core.context.variable.Variable; import org.jbpm.process.core.context.variable.VariableScope; -public interface VariableDeclarations { - String getType(String vname); - - Map<String, String> getTypes(); - - static VariableDeclarations of(VariableScope vscope) { HashMap<String,...
codereview_java_data_3442
void setBottomSheetDetailsSmaller(); } - interface ListView { void updateListFragment(List<Place> placeList); } Lets rename this to something else, ListView is android framework keyword void setBottomSheetDetailsSmaller(); } + interface NearbyListView { void up...
codereview_java_data_3448
nextValue = profile.getBasalValues()[i + 1]; if (profileBlock.getDuration() * 60 != (nextValue != null ? nextValue.timeAsSeconds : 24 * 60 * 60) - basalValue.timeAsSeconds) return false; - if (Math.abs(profileBlock.getBasalAmount() - basalValue.value) > (basalVa...
codereview_java_data_3453
this(accumuloPropsLocation, Collections.emptyMap()); } - @SuppressFBWarnings(value = "URLCONNECTION_SSRF_FD", - justification = "location of props is specified by an admin") public SiteConfiguration(URL accumuloPropsLocation, Map<String,String> overrides) { config = createMap(accumuloPropsLocation...
codereview_java_data_3455
import java.util.HashMap; import java.util.Map; import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; import com.alibaba.fastjson.JSON; Will `topicConfigMap` `subGroupConfigMap` be used by multiple threads? If not, it would be better just use plain HashMa...
codereview_java_data_3461
public class AuditContactListener { // Injection does not work because this class is not managed by CDI private AuditRepository auditRepository; /** You could note that this is fixed in Java EE 7 :-) public class AuditContactListener { // Injection does not work because this class is not managed...
codereview_java_data_3470
} finally { master.shutdown(); master.destroy(); - UtilAll.deleteFile(new File(storePath)); } } It seems that this test only covers the consistent condition? } finally { master.shutdown(); master.destroy(); + del...
codereview_java_data_3479
StorageComponent delegate() { StorageComponent result = delegate; if (result != null) return delegate; result = factory.getBean(StorageComponent.class); if (result instanceof TracingStorageComponent) { result = ((TracingStorageComponent) result).delegate; Should this be synchr...
codereview_java_data_3482
private static final String DELIVERY_REPORT = "d_rpt"; static final String PART_COUNT = "part_count"; - protected static final String STATUS_WHERE = STATUS + " = ?"; - public static final String CREATE_TABLE = "CREATE TABLE " + TABLE_NAME + " (" + ID + " INTEGER PRIMARY KEY, " ...
codereview_java_data_3492
return false; } else { HashMap<String, BrokerData> brokers = clusterInfo.getBrokerAddrTable(); - for (Entry<String, BrokerData> brokerNameEntry : brokers.entrySet()) { - HashMap<Long, String> brokerIps = brokerNameEntry.getValue().getBrokerAddrs(); ...
codereview_java_data_3495
s.put("hideSpecialAccounts", Settings.versions( new V(1, new BooleanSetting(false)) )); - s.put("privacyMode", Settings.versions( - new V(1, new BooleanSetting(false)) )); s.put("language", Settings.versions( new V(1, ne...
codereview_java_data_3497
public HashMap<String, String> getRuntimeInfo() { HashMap<String, String> result = this.storeStatsService.getRuntimeInfo(); - String commitLogStorePath = DefaultMessageStore.this.getMessageStoreConfig().getStorePathCommitLog(); - if (commitLogStorePath.contains(MessageStoreConfig.MULTI_PATH_...
codereview_java_data_3513
final SortedMap<UInt256, UInt256> updatedStorage = updated.getUpdatedStorage(); if (!updatedStorage.isEmpty()) { // Apply any storage updates - MerklePatriciaTrie<Bytes32, BytesValue> storageTrie = freshState ? wrapped.newAccountStorageTrie(Hash.EM...
codereview_java_data_3520
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.cloud.dataflow.server.repository.DuplicateStreamDefinitionException; -import org.springframework.cloud.dataflow.server.repository.NoSuchStreamDefinitionException; -...
codereview_java_data_3524
public void launchApp(String id) { execute(ChromeDriverCommand.LAUNCH_APP, ImmutableMap.of("id", id)); } - - @Override - public TouchScreen getTouch() { - return new RemoteTouchScreen(this.getExecuteMethod()); - } } would be better to store as a local private variable (like locationContext / webStorage)...
codereview_java_data_3525
ImmutableSet.of(DataOperations.OVERWRITE, DataOperations.REPLACE, DataOperations.DELETE); private static final Set<String> VALIDATE_DATA_FILES_EXIST_SKIP_DELETE_OPERATIONS = ImmutableSet.of(DataOperations.OVERWRITE, DataOperations.REPLACE); - // delete files are only added in "overwrite" operations ...
codereview_java_data_3543
invsum += monster.inventory(i); TestEq(invsum, 10); - // Method using a vector access object: - ByteVector inventoryVector = monster.inventoryVector(); - TestEq(inventoryVector.length(), 5); - invsum = 0; - for (int i = 0; i < inventoryVector.length(); i++) - ...
codereview_java_data_3554
+ "order by mgr, deptno"; RelNode r = checkPlanning(tester, preProgram, new HepPlanner(program), sql); - RelCollation c = r.getInput(0).getTraitSet().getTrait(RelCollationTraitDef.INSTANCE); - assertEquals("Collation is incorrect", "[3, 7]", c.toString()); } @Test public void testWindowOnSorte...
codereview_java_data_3563
} } - // This is a set of WALs that are closed but may still be referenced byt tablets. A LinkedHashSet // is used because its very import to know the order in which WALs were closed when deciding if a - // WAL is eligible for removal. LinkedHashSet<DfsLogger> closedLogs = new LinkedHashSet<>(); @Vis...
codereview_java_data_3565
/** This should be used as a {@link ClassRule} as it takes a very long time to start-up. */ class KafkaCollectorRule extends ExternalResource { static final Logger LOGGER = LoggerFactory.getLogger(KafkaCollectorRule.class); - static final String IMAGE = "openzipkin/zipkin-kafka"; static final int KAFKA_PORT = ...
codereview_java_data_3576
} } - /** - * Service data changed event. - */ - public static class ServiceRemovedEvent extends ServiceEvent { - - private static final long serialVersionUID = 2123694271992630822L; - - public ServiceRemovedEvent(Service service) { - super(service); ...
codereview_java_data_3595
Node<V> node = idToNode.get(entry.getKey()); Node<V> parent = idToNode.get(entry.getValue()); if (parent == null) { // handle headless trace - if (rootNode == null) rootNode = new Node<>(); rootNode.addChild(node); } else { parent.addChild(...
codereview_java_data_3596
*/ public abstract class JdbcLob extends TraceObject { - final class Output extends PipedOutputStream { private final Task task; - Output(PipedInputStream snk, Task task) throws IOException { super(snk); this.task = task; } can we give this a more useful name? "...
codereview_java_data_3601
((BigDecimal) obj).scale()); case TIMESTAMP: return TimestampData.fromEpochMillis((Long) obj); default: return obj; } I think this should use the generator for generics and validate against generic data. That will catch more cases. ((BigDeci...
codereview_java_data_3614
} char replyCodeCategory = line.charAt(0); - if ((replyCodeCategory == '4') || (replyCodeCategory == '5')) { if (mEnhancedStatusCodesProvided) { throw buildEnhancedNegativeSmtpReplyException(replyCode, results); } else { I meant something like 'isRepl...
codereview_java_data_3618
Set<Module> modules = kompile.parseModules(compiledDefinition, defModuleNameUpdated, specModuleNameUpdated, absSpecFile, backend.excludedModuleTags(), readOnlyCache); // avoid the module duplication bug #1838 - //Map<String, Module> modulesMap = modules.stream().collect(Collect...
codereview_java_data_3625
returnBase64(call, exif, bitmapOutputStream); } else if (settings.getResultType() == CameraResultType.URI) { returnFileURI(call, exif, bitmap, u, bitmapOutputStream); - } else if (settings.getResultType() == CameraResultType.BASE64NOMETADATA) { - returnBase64NoMetadata(call, exif, bitmapOutpu...
codereview_java_data_3627
} ContentValues cv = new ContentValues(); - cv.put("tag", context.getPackageName() + "/.RoutingActivity"); cv.put("count", count); context.getContentResolver().insert( would prefer to get the launch activity programmatically if we can since this may be an unnoticed bug if we ...
codereview_java_data_3629
import java.io.ObjectOutputStream; import java.io.OutputStream; import java.io.Serializable; import java.util.Objects; -import org.apache.accumulo.core.util.Base64; import org.apache.hadoop.io.Writable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; I had thought these both (commons and our built-in u...
codereview_java_data_3631
OutputFile outFile = Files.localOutput(parquetFile); try (FileAppender<Record> appender = Parquet.write(outFile) .schema(FILE_SCHEMA) - .withWriterVersion(WriterVersion.PARQUET_2_0) // V2 is needed to force dictionary encoding for FIXED type .build()) { GenericRecordBuilder bui...
codereview_java_data_3632
} @Test - public void testCaseIssue3106() { - plsql.parse("CREATE OR REPLACE PROCEDURE bar\nIS\n v_link varchar2(10) := 'xxx';\nBEGIN\n EXECUTE IMMEDIATE 'drop database link ' || v_link;\nEND bar;"); } } Test name should be something like "testExecuteImmediateIssue3106" - the test before (#...
codereview_java_data_3637
*/ package javaslang.collection.euler; import javaslang.collection.List; import org.junit.Test; import java.time.DayOfWeek; import java.time.LocalDate; import static org.assertj.core.api.Assertions.assertThat; /** Hi @ashrko619 What about `For(List.range(startYear, endYear + 1), List.range(1, 13))`? :) */ ...
codereview_java_data_3655
private static final String DEFAULT_VAR = "Var"; private static final String JSON_NODE = "com.fasterxml.jackson.databind.JsonNode"; private static final String DEFAULT_WORKFLOW_VAR = "workflowdata"; - private static final Set<String> DEFAULT_IMPORTS = new HashSet<>(Arrays.asList("org.jbpm.serverless.w...
codereview_java_data_3656
mmsDatabase.delete(item.getMessageId()); MessageNotifier.updateNotification(context, item.getMasterSecret(), messageAndThreadId.second); - if(item.getMasterSecret() == null) - PebbleNotifier.sendMmsNotification(context, item.getMasterSecret(), messageAndThreadId.first, messageAndThreadId.second); ...