id stringlengths 23 26 | content stringlengths 182 2.49k |
|---|---|
codereview_java_data_1788 | assertEquals(2, requests.size());
AppDeploymentRequest logRequest = requests.get(0);
assertThat(logRequest.getDefinition().getName(), is("log"));
- assertEquals(logRequest.getDeploymentProperties().get(AppDeployer.INDEXED_PROPERTY_KEY), "true");
AppDeploymentRequest timeRequest = requests.get(1);
assert... |
codereview_java_data_1792 | // Do nothing.
}
- public void beforeChangeValueOf(WebElement element, WebDriver driver, CharSequence[] value) {
// Do nothing.
}
- public void afterChangeValueOf(WebElement element, WebDriver driver, CharSequence[] value) {
// Do nothing.
}
change 'value' to keysToSend, here and in other ref... |
codereview_java_data_1801 | ldapfilter.substring(ldapfilter.indexOf("=",
ldapfilter.indexOf(searchRangeStr)+searchRangeStr.length()));
}
-
- if (Log.isDebugEnabled()) {
- Log.debug("Trying to find group names using query: " + ldapfilter);
- }
// ... |
codereview_java_data_1806 | }
private void throwUnknownLanguageVersionException(String minOrMax, String unknownVersion) {
- throw new IllegalArgumentException("Unknown " + minOrMax + " Language Version '" + unknownVersion
- + "' for Language '" + language.getTerseName()
- ... |
codereview_java_data_1818 | import com.github.javaparser.symbolsolver.model.resolution.TypeSolver;
import com.google.common.collect.ImmutableList;
-import java.util.EnumSet;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
-import static com.github.javaparser.symbolsolver.javaparser.Navigator.getParentNod... |
codereview_java_data_1840 | return mockPrivateTransactionProcessor;
}
- private Enclave brokenMockEnclave() throws Exception {
Enclave mockEnclave = mock(Enclave.class);
when(mockEnclave.receive(any(ReceiveRequest.class))).thenThrow(EnclaveException.class);
return mockEnclave;
}
@Before
- public void setUp() throws ... |
codereview_java_data_1856 | import com.fasterxml.jackson.databind.node.ArrayNode;
-import static org.assertj.core.api.Assertions.*;
-
/**
* @author Tom Baeyens
* @author Falko Menge
Thanks for the PR. Project formatting standards are not to use package imports but rather enumerate them all. In addition static imports are at the top of the ... |
codereview_java_data_1858 | class ZKSecurityTool {
private static final Logger log = LoggerFactory.getLogger(ZKSecurityTool.class);
private static final int SALT_LENGTH = 8;
- private static final Charset CRYPT_CHARSET = UTF_8;
// Generates a byte array salt of length SALT_LENGTH
private static byte[] generateSalt() {
Could inline ... |
codereview_java_data_1862 | this.entityId = entityId;
this.assertionConsumerServiceLocation = assertionConsumerServiceLocation;
this.assertionConsumerServiceBinding = assertionConsumerServiceBinding;
- this.singleLogoutServiceLocation = singleLogoutServiceLocation;
- this.singleLogoutServiceResponseLocation = singleLogoutServiceRespons... |
codereview_java_data_1863 | * @param <RequestT> The request
*/
@SdkProtectedApi
-public class IdentifiableRequest<RequestT> {
private final String id;
private final RequestT request;
Backlog item: Will do in a separate PR.
* @param <RequestT> The request
*/
@SdkProtectedApi
+public final class IdentifiableRequest<RequestT> {... |
codereview_java_data_1864 | if (CryptoHelper.isPgpInlineEncrypted(message)
|| CryptoHelper.isPgpMimeEncrypted(message)
|| CryptoHelper.isSMimeEncrypted(message)) {
- return "*Encrypted*";
}
getViewablesIfNecessary();
return MessagePreviewExtractor.extractPreview(cont... |
codereview_java_data_1867 | void testSameType() {
validator()
.addInputLines(
- "Test.java", "public class Test {", " public void badMethod(Integer a, Integer b) {}", "}")
.expectUnchanged()
.doTestExpectingFailure(TEST_MODE);
}
can put a `//` after `"T... |
codereview_java_data_1875 | return isJUnit3Class && method.isVoid() && method.getName().startsWith("test");
}
- protected boolean isJUnit3Class(ASTCompilationUnit node) {
ASTClassOrInterfaceDeclaration cid = node.getFirstDescendantOfType(ASTClassOrInterfaceDeclaration.class);
if (cid == null) {
retu... |
codereview_java_data_1877 | return RelDistributionTraitDef.INSTANCE.canonize(trait);
}
- public static RelDistribution with(RelDistribution.Type type, ImmutableIntList keys) {
return new RelDistributionImpl(type, keys);
}
maybe `of()` to be consistent with `RelCollatioins`?
return RelDistributionTraitDef.INSTANCE.canonize(... |
codereview_java_data_1883 | return;
}
- for (Entry<Object, Object> keyEntry : properties.entrySet()) {
- System.out.printf("%-50s= %s\n", keyEntry.getKey(), keyEntry.getValue());
}
System.out.printf("%n");
keyEntry could be renamed to entry, and so is the obove
return;
... |
codereview_java_data_1884 | if (iconColor != null) {
try {
mBuilder.setColor(Color.parseColor(iconColor));
- } catch (Exception ex) {
- call.error("The iconColor string was not able to be parsed. Please provide a valid string hexidecimal color code.", ex);
return;
}
}
For consistency, better... |
codereview_java_data_1888 | fatalException = new TableDeletedException(tableId.canonical());
} catch (SampleNotPresentException e) {
fatalException = e;
- } catch (Throwable t) {
if (queryThreadPool.isShutdown())
log.debug("Caught exception, but queryThreadPool is shutdown", t);
else
... |
codereview_java_data_1895 | return cs;
}
- public boolean getDisableAudioTrackSorting() {
- return getBoolean(KEY_DISABLE_AUDIO_TRACK_SORTING, false);
}
public boolean isDynamicPls() {
```suggestion public boolean isSortAudioTracksByAlbumPosition() { return getBoolean(KEY_SORT_AUDIO_TRACKS_BY_ALBUM_POSITION, true); ```
return cs;
... |
codereview_java_data_1897 | import org.kie.kogito.Application;
import org.kie.kogito.tracing.decision.event.explainability.PredictInput;
import org.kie.kogito.tracing.decision.explainability.ExplainabilityService;
@Path("/predict")
public class QuarkusExplainableResource {
private final Application application;
private final Explai... |
codereview_java_data_1902 | break;
}
}
- if (name != null && !name.trim().isEmpty()) {
- nameNode.put(locale, name);
}
- if (documentation != null && !documentation.trim().isEmpty()) {
- ... |
codereview_java_data_1911 | TableMetadata lastMetadata = ops.current();
try {
if (lastMetadata == null) {
- LOG.error("Not an iceberg table: %s", identifier);
return false;
} else {
if (purge) {
This is not an error. The API states that if the table doesn't exist, then the catalog should return fa... |
codereview_java_data_1912 | @Test
public void shouldCreateSeparateObservationsForEachCounterLabelValue() {
final LabelledMetric<Counter> counter =
- metricsSystem.createCounter(PEERS, "connected", "Some help string", "labelName");
counter.labels("value1").inc();
counter.labels("value2").inc();
Should we make one of th... |
codereview_java_data_1922 | public class NewSessionRequest {
- private final UUID requestId;
private final CountDownLatch latch;
private HttpResponse sessionResponse;
- public NewSessionRequest(UUID requestId, CountDownLatch latch) {
this.requestId = requestId;
this.latch = latch;
}
We may want a `RequestId` class. Passing ... |
codereview_java_data_1942 | /**
* @author Julio Vilmar Gesser
*/
-public final class ClassOrInterfaceType extends Type implements NamedNode {
private ClassOrInterfaceType scope;
that is not the name of the node, that is a "reference by name"... I think this shouldn't be a `NamedNode`
/**
* @author Julio Vilmar Gesser
*/
+public fina... |
codereview_java_data_1951 | this.config = config.initialize();
- if (Boolean.TRUE.equals(Boolean
- .valueOf(this.config.getSiteConfig().get(Property.TSERV_NATIVEMAP_ENABLED.name())))) {
if (!NativeMap.isLoaded())
throw new RuntimeException(
"MAC configured to use native maps, but unable to load the libr... |
codereview_java_data_1952 | private static final double RATIO_OF_DESCRIBE_STREAM_RATE_UTILIZED = 0.1;
private final AtomicInteger shardCount;
- private final RandomizedRateTracker descriteStreamRateTracker;
private final RetryTracker describeStreamRetryTracker;
private Future<DescribeStreamSummaryResult> describeStreamResul... |
codereview_java_data_1955 | // Mark as stopped
context.component._setStartStop(StartStop.STOP);
- return State.UNDEFINED;
}
}
If the inverter is stopped, it is a defined state. Why is the next state undefined?
// Mark as stopped
context.component._setStartStop(StartStop.STOP);
+ return State.STOPPED;
}
} |
codereview_java_data_1956 | new ThreeColumnRecord(1, "b c", "data"),
new ThreeColumnRecord(2, "ab", "data"));
- File location = temp.newFolder("partitioned_table");
String tableName = "external_table";
spark.createDataFrame(records, ThreeColumnRecord.class)
I suppose we cannot use Java9 factory methods in... |
codereview_java_data_1961 | return taskExecution;
}
- public TaskExecutionManifest sanitizeTaskManifest(TaskExecutionManifest taskManifest) {
- if (taskManifest == null) {
return null;
}
TaskExecutionManifest sanitizedTaskExecutionManifest = new TaskExecutionManifest();
TaskExecutionManifest.Manifest sanitizedManifest = sanitiz... |
codereview_java_data_1968 | * Start the timer to make sure processing doesn't take too long.
*/
public void start() {
- stopAt = System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(MAX_PROCESSING_TIME);
}
/**
rename stopAt to stopAtNs
* Start the timer to make sure processing doesn't take too long.
*/... |
codereview_java_data_1976 | Utils.idLock.lock();
try {
tableInfo.tableId = Utils.getNextId(tableInfo.tableName, master.getInstance(), Table.ID::of);
- if (tableInfo.props.containsKey(Property.TABLE_OFFLINE_OPTS + "create.initial.splits")
- && this.splitFile != null) {
- storeSplitFileNameInZooKeeper();
- ... |
codereview_java_data_1984 | int size = mb.readInt();
currentReaders = new ArrayList<>(size);
- deepCopies = new ArrayList<>();
for (int i = 0; i < size; i++) {
LocalityGroupMetadata lgm = new LocalityGroupMetadata(ver, rdr);
We only ever do `add()` on this, which can cause problems on certain system p... |
codereview_java_data_1987 | metricsSystem.createCounter(
MetricCategory.SYNCHRONIZER,
"inboundQueueCounter",
- "parallel download pipeline metric");
this.outboundQueueCounter =
metricsSystem.createCounter(
MetricCategory.SYNCHRONIZER,
"outboundQueueCounter",
- ... |
codereview_java_data_1993 | */
public interface OpenFoodAPIService {
- String PRODUCT_API_COMMENT = "new android app";
@GET("api/v0/product/{barcode}.json?fields=image_small_url,vitamins_tags,minerals_tags,amino_acids_tags,other_nutritional_substances_tags,image_front_url,image_ingredients_url,image_nutrition_url,url,code,traces_tags,i... |
codereview_java_data_2002 | package com.palantir.gradle.junit;
import org.gradle.api.NamedDomainObjectSet;
import org.gradle.api.Project;
import org.gradle.api.model.ObjectFactory;
import org.immutables.value.Value.Immutable;
public class JunitTaskResultExtension {
Please can we have test for this PR - would also make it more obvious how i... |
codereview_java_data_2004 | }
private static int killLoadData(String stmt, int offset) {
- if (stmt.length() > offset + 5) {
char c1 = stmt.charAt(++offset);
char c2 = stmt.charAt(++offset);
char c3 = stmt.charAt(++offset);
Incorrect boundary check
}
private static int killLoadDa... |
codereview_java_data_2005 | .load(media.getImageLocation())
.apply(RequestOptions.diskCacheStrategyOf(ApGlideSettings.AP_DISK_CACHE_STRATEGY))
.submit(iconSize, iconSize)
- .get();
views.setImageViewBitmap(R.id.imgvCover, icon);
... |
codereview_java_data_2011 | return true;
}
public void discoverChildren() {
if (isDiscovered()) {
return;
}
@valib why remove the `isAddGlobally`? It is what prevents the startup scan from taking up memory that is never released
return true;
}
+ @Override
public void discoverChildren() {
+ discoverChildren(true);
+ }
+
... |
codereview_java_data_2020 | private final boolean isUp;
private final int maxSession;
private final String capabilities;
public Node(UUID id,
URI uri,
Nit: Make this a private constant in the class, as some of the state picked up by reflection is stored.
private final boolean isUp;
private final int maxSession;
... |
codereview_java_data_2023 | * checkpointed files were actually committed or not. {@code --allowNonRestoredState} can lead to data loss if the
* Iceberg commit failed in the last completed checkpoints.
*
- * @param newPrefix defines the iceberg table's key.
* @return {@link Builder} to connect the iceberg table.
*... |
codereview_java_data_2027 | }
int p = 0;
int result = -1;
- while (t.length() >= p + slice.length()) {
- int r = findSlice(t, p, slice);
if (r < 0) {
return result;
}
we do not need to check this whole if - we've already done i... |
codereview_java_data_2028 | * @return {@code true} if {@code find()} implementation performs scan over all
* index, {@code false} if {@code find()} performs the fast lookup
*/
- boolean isFindSlow();
/**
* Find a row or a list of rows and create a cursor to iterate over the
isFindSlow -> isFindUsingFullTab... |
codereview_java_data_2030 | @Override
public Capabilities getCapabilities() {
- return this.capabilities;
}
@Override
This `this` isn't needed. Generally, we only use the `this` keyword where it makes code unambiguous.
@Override
public Capabilities getCapabilities() {
+ return capabilities;
}
@Override |
codereview_java_data_2032 | && subclassDescription.getXmlLang() != null) {
description = subclassDescription.getValue();
}
- subItems.add(new DepictedItem(label, description, "", false,entityId ));
Timber.e(label);
}
... |
codereview_java_data_2036 | @Override
protected void configure() {
- install(new SingularityServiceModule());
}
@Provides
side note to bringing in this dep, installing this module would also likely start up a number of pollers/db connections/zk connections/etc which we don't want
@Override
protected void configure() {
}
... |
codereview_java_data_2044 | flatModules.add(toFlatModule(m));
}
- scala.collection.Set<Module> koreModules = FlatModule.toModule(immutable(flatModules), Set());
return Constructors.Definition(
koreModules.find(x -> x.name().equals(mainModuleName))
.getOrElse(() -> { t... |
codereview_java_data_2049 | */
public final void setClockSkew(Duration clockSkew) {
Assert.notNull(clockSkew, "clockSkew cannot be null");
- Assert.isTrue(clockSkew.getSeconds() >= 0, "clockSkew must be >= 0");
this.clockSkew = clockSkew;
}
Let's remove `MINIMUM_CLOCK_SKEW` and update the assertion as follows: `Assert.isTrue(clockS... |
codereview_java_data_2051 | final JsonRpcRequest request =
new JsonRpcRequest(JSON_RPC_VERSION, TXPOOL_PENDING_TRANSACTIONS_METHOD, new Object[] {});
- TransactionInfo local = createTransactionInfo(true);
- TransactionInfo secondLocal = createTransactionInfo(true);
- TransactionInfo remote = createTransactionInfo(false);
... |
codereview_java_data_2052 | /**
* MediaSource based on local image files. Currently, this MediaSource expects
- * a series of H264 frames located somewhere within an Android Assets folder.
*/
public class ImageFileMediaSource implements MediaSource {
// Codec private data could be extracted using gstreamer plugin
android samples folde... |
codereview_java_data_2053 | log.error("ScheduledTask updateNameServerAddressList exception", e);
}
}
- }, 1, 1, TimeUnit.MINUTES);
}
if (this.brokerConfig.getNamesrvAddr() != null) {
It would be better to keep consistent with the s... |
codereview_java_data_2061 | String.format(selectExprFormat, URI_DETAIL, FILE_PATH_ONLY, FILE_PATH_ONLY), // file path only
String.format(selectExprFormat, URI_DETAIL, FILE_PATH, FILE_PATH)); // fully qualified path
}
-
- static StructType fileDetailStructType() {
- StructType customStructType = new StructType();
-... |
codereview_java_data_2062 | import com.hazelcast.nio.IOUtil;
import javax.annotation.Nonnull;
-import java.io.IOException;
import java.util.Map.Entry;
import static com.hazelcast.jet.Util.entry;
you can move `IOUtil.decompress` out and call it with uncheckCall, this way it's more explicit.
import com.hazelcast.nio.IOUtil;
import javax.ann... |
codereview_java_data_2064 | "com.fsck.k9.activity.MessageCompose.quotedTextFormat";
private static final String STATE_KEY_NUM_ATTACHMENTS_LOADING = "numAttachmentsLoading";
private static final String STATE_KEY_WAITING_FOR_ATTACHMENTS = "waitingForAttachments";
- private static final String STATE_FIRST_TIME_EMPTY_SUBJECT... |
codereview_java_data_2076 | cleanImmediately = false;
{
- String[] storePaths;
String commitLogStorePath = DefaultMessageStore.this.getMessageStoreConfig().getStorePathCommitLog();
- if (commitLogStorePath.contains(MessageStoreConfig.MULTI_PATH_SPLITTER)) {
- ... |
codereview_java_data_2101 | import org.springframework.context.annotation.Configuration;
/**
- * Creates TaskPlatform implementations to launch tasks on cloud foundry
* @author Mark Pollack
*/
@Configuration
update the docs to state `launch or schedule tasks`
import org.springframework.context.annotation.Configuration;
/**
+ * Creates ... |
codereview_java_data_2136 | private static AdminApplication application;
- private static JLineShellComponent shell;
-
private static CloudDataShell cloudDataShell;
/**
It's worth adding a delegating stop() in the CloudDataShell, thus no need to have both the shell and cloudDataShell fields? (could just have the CloudDataShell assigned to ... |
codereview_java_data_2142 | transactions = new Transactions(accounts);
web3 = new Web3(new Web3Transactions());
pantheon = new PantheonNodeFactory();
- contract = new ContractVerifier(accounts.getPrimaryBenefactor());
}
@After
NIT: naming this variable as `contract` can be misleading. Shouldn't we name it `contractVerifie... |
codereview_java_data_2149 | final boolean devMode,
final GenesisConfigProvider genesisConfigProvider,
final Boolean p2pEnabled,
- final boolean discovery) {
this.name = name;
this.miningParameters = miningParameters;
this.jsonRpcConfiguration = jsonRpcConfiguration;
Nitpick: Field that's being set is `Boo... |
codereview_java_data_2154 | Timber.d("Contributions tab selected");
tabLayout.getTabAt(CONTRIBUTIONS_TAB_POSITION).select();
isContributionsFragmentVisible = true;
- ((NearbyParentFragment)contributionsActivityPagerAdapter.getItem(NEARBY_TAB_POSITION... |
codereview_java_data_2157 | sortOrder = select.getSortOrder();
}
item = table.getBestPlanItem(s, masks, filters, filter, sortOrder);
// The more index conditions, the earlier the table.
// This is to ensure joins without indexes run quickly:
// x (x.a=10); y (x.b=y.... |
codereview_java_data_2202 | throw new RuntimeException(e);
}
}
- if (pass != null) {
- return new PasswordToken(pass.value);
- }
-
- return null;
}
@Parameter(names = {"-z", "--keepers"}, description = "Comma separated list of zookeeper hosts (host:port,host:port)")
This becomes simpler too. Either we thr... |
codereview_java_data_2208 | try {
wallpaperManager.setBitmap(bitmap);
ViewUtil.showLongToast(context, context.getString(R.string.wallpaper_set_successfully));
- if (progressDialog.isShowing() && progressDialog != null) {
progressDialog.dismiss();
}
} catch (IOExc... |
codereview_java_data_2212 | @Override
protected void onPostExecute(Contribution contribution) {
super.onPostExecute(contribution);
- //temporarily disabled for debugging
- //uploadService.queue(UploadService.ACTION_UPLOAD_FILE, contribution);
onComplete.onUp... |
codereview_java_data_2214 | import net.sourceforge.pmd.cpd.internal.JavaCCTokenizer;
import net.sourceforge.pmd.lang.TokenManager;
import net.sourceforge.pmd.lang.vf.ast.VfTokenManager;
/**
* @author sergey.gorbaty
We need to skip the BOM to preserve same behavior...
import net.sourceforge.pmd.cpd.internal.JavaCCTokenizer;
import net.so... |
codereview_java_data_2220 | public final class TypeInferenceResolver {
- public static class ResolutionFailed extends RuntimeException {
}
It's a best practice to finish all exception names with `Exception`... this hsould probably be `ResolutionFailedException`
public final class TypeInferenceResolver {
+ public static class Resolu... |
codereview_java_data_2221 | package tech.pegasys.pantheon.consensus.ibft.jsonrpc.methods;
import tech.pegasys.pantheon.consensus.ibft.IbftBlockInterface;
-import tech.pegasys.pantheon.ethereum.chain.Blockchain;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
impor... |
codereview_java_data_2226 | "Archive any files/directories instead of moving to the HDFS trash or deleting."),
GC_TRACE_PERCENT("gc.trace.percent", "0.01", PropertyType.FRACTION,
"Percent of gc cycles to trace"),
- GC_USE_FULL_COMPACTION("gc.use.full.compaction", "true", PropertyType.BOOLEAN,
- "When gc completes, initiate ... |
codereview_java_data_2236 | this.project = project;
project.getPluginManager().withPlugin("java", plugin -> {
- project.getTasks().register("formatDiff", FormatDiffTask.class, task -> {
- task.setDescription("Format only chunks of files that appear in git diff");
- task.setGroup("Formatti... |
codereview_java_data_2237 | @Override
public boolean isUserCompaction() {
return userCompaction;
}
A sanity check like the one in `isFullMajorCompaction()` that checks if `scope` is `majc` would be nice.
@Override
public boolean isUserCompaction() {
+ if (scope != IteratorScope.majc)
+ throw new IllegalStateException... |
codereview_java_data_2242 | /** Execution context for draining queued ibft events and applying them to a maintained state */
public class IbftProcessor implements Runnable {
- private static final Logger LOG = LogManager.getLogger(IbftEventQueue.class);
private final IbftEventQueue incomingQueue;
private final ScheduledExecutorService ro... |
codereview_java_data_2244 | private void analyzeTables() {
// take a local copy and clear because in rare cases we can call
- // back into markTableForAnalyzer while iterating here
HashSet<Table> tablesToAnalyzeLocal = tablesToAnalyze;
tablesToAnalyze = null;
int rowCount = getDatabase().getSettings... |
codereview_java_data_2247 | /*case ONEDRIVE:
signInOneDrive();
break;*/
- default://do nothing
}
} else {
AlertDialog alertDialog = new AlertDialog.Builder(this)
Please don't leave an empty default
/*case ONEDRIVE:
... |
codereview_java_data_2249 | @Override
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
- return isSensibleDirectoryToEnter(dir)?CONTINUE:SKIP_SUBTREE;
}
});
return this;
I would add a few spaces around operators here
... |
codereview_java_data_2261 | public String toString() {
return String.format(
"Top rising stocks:%n%s\nTop falling stocks:%n%s",
- topIncrease.stream().map(kwr -> String.format(" %s by %.5f", kwr.key(), kwr.result()))
.collect(joining("\n")),
- ... |
codereview_java_data_2265 | }
@Override
- public void unSubscriber(Subscriber subscriber) {
subscribers.remove(subscriber);
}
rename to remove maybe better?
}
@Override
+ public void removeSubscriber(Subscriber subscriber) {
subscribers.remove(subscriber);
} |
codereview_java_data_2268 | @Override
public OverloadSelectionResult getOverloadSelectionInfo() {
- getTypeMirror(); // force evaluation
- return Objects.requireNonNull(result, "null result");
}
void setOverload(OverloadSelectionResult result) {
I think, we should be careful to add such side effects.... getTypeM... |
codereview_java_data_2269 | /**
- * Retrieves the body of the declaration.
*
- * @return The body of the declaration
*/
List<ASTAnyTypeBodyDeclaration> getDeclarations();
Not sure: what is "the body of the declaration" I guess, it's something like: Gets all the declarations declared within the body of this type. N... |
codereview_java_data_2270 | */
updater.updateState(upload.id, TransferState.WAITING_FOR_NETWORK);
LOGGER.debug("Network Connection Interrupted: " + "Moving the TransferState to WAITING_FOR_NETWORK");
progressListener.progressChanged(new ProgressEvent(0));
... |
codereview_java_data_2272 | }
ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, alternateUrlsTitleList);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
- binding.spinnerAlternateUrls.setAdapter(adapter);
- bind... |
codereview_java_data_2274 | }
inflater.inflate(R.menu.conversation, menu);
- if(isSingleConversation()){
inflater.inflate(R.menu.conversation_new_group,menu);
}
There should be spaces between `if` and `(isSingle...)` and between `...Conversation())` and `{` So it should read as: `if (isSingleConversation()) {`
}
... |
codereview_java_data_2285 | if (wasDST(cal)) {
LoopPlugin loopPlugin = LoopPlugin.getPlugin();
- if (loopPlugin.isSuspended()) {
warnUser(Notification.DST_LOOP_DISABLED, MainApp.gs(R.string.dst_loop_disabled_warning));
} else {
log.debug("Loop already suspended");
I ... |
codereview_java_data_2295 | return value + " " + this.symbol;
case ON_OFF:
boolean booleanValue = (Boolean) value;
- return booleanValue ? "ON" : "OFF";
- case HOUR_DATE:
- case MINUTE_SECOND:
- case MONTH_YEAR:
}
return "FORMAT_ERROR"; // should never happen, if 'switch' is complete
}
This method will always resturn "FO... |
codereview_java_data_2303 | package com.hazelcast.jet.cdc.impl;
import com.hazelcast.function.FunctionEx;
-import com.hazelcast.jet.cdc.ChangeEvent;
import com.hazelcast.jet.core.Processor;
import com.hazelcast.jet.pipeline.SourceBuilder;
import com.hazelcast.jet.pipeline.StreamSource;
this is a private class but extended by a public one. Y... |
codereview_java_data_2305 | * @param file a DataFile to remove from the table
* @return this for method chaining
*/
- DeleteFiles deleteFile(DataFile file);
/**
* Delete files that match an {@link Expression} on data rows from the table.
I don't think it is necessary to remove the default implementation. Overriding it in `Str... |
codereview_java_data_2306 | return false;
}
- MetricOptions version = (MetricOptions) o;
- return options.equals(version.options);
}
rename version to "other" - the version might be confusing in the future :)
return false;
}
+ MetricOptions other = (MetricOptions) o;
+ ... |
codereview_java_data_2314 | package org.flowable.editor.language.xml;
import java.util.List;
-import org.assertj.core.api.Assertions;
import org.flowable.bpmn.converter.BpmnXMLConverter;
import org.flowable.bpmn.model.Activity;
import org.flowable.bpmn.model.BpmnModel;
If you staticly import `assertThat` then lines like this can be written ... |
codereview_java_data_2318 | JsonNode rootNode = objectMapper.readTree(response.getEntity().getContent());
closeResponse(response);
assertThatJson(rootNode)
- .when(Option.IGNORING_EXTRA_FIELDS, Option.IGNORING_EXTRA_ARRAY_ITEMS)
.isEqualTo("{"
+ "data: [ {"
... |
codereview_java_data_2323 | longitude.setValue(JsonHelper.safeGetDouble(d, "longitude"));
distance.setValue(JsonHelper.safeGetDouble(d, "distance"));
name.setValue(JsonHelper.safeGetString(d, "name"));
- mode.setValue(JsonHelper.safeGetString(d, "mode"));
lastRun = JsonHelper.safeGetL... |
codereview_java_data_2327 | .build();
ScheduledExecutorService scheduledExecutor = builder.scheduledExecutor;
ThreadFactory threadFactory = new ThreadFactoryBuilder().threadNamePrefix("DefaultSqsBatchManager").build();
- this.executor = ... |
codereview_java_data_2344 | * If true, a default {@link OAuth2AuthorizedClient} can be discovered from the current Authentication. It is
* recommended to be cautious with this feature since all HTTP requests will receive the access token if it can be
* resolved from the current Authentication.
- *
* @param defaultOAuth2AuthorizedClie... |
codereview_java_data_2348 | * <img src="doc-files/binaryExpr_60x.svg" />
* </figure>
*/
-public class ASTInfixExpression extends AbstractJavaExpr implements InternalInterfaces.JSingleChildNode<ASTExpression>, LeftRecursiveNode, InternalInterfaces.BinaryExpressionLike {
private BinaryOp operator;
Removing final opens up this class for ... |
codereview_java_data_2349 | public class ObservableRepository {
- public static final String COMPLETED_OBSERVABLES_LIST_NAME = INTERNAL_JET_OBJECTS_PREFIX + "completedObservables";
private static final int MAX_CLEANUP_ATTEMPTS_AT_ONCE = 10;
private final JetInstance jet;
private final IList<Tuple2<String, Long>> completedObserv... |
codereview_java_data_2352 | public static final SqlFunction CURRENT_TIMESTAMP =
new SqlAbstractTimeFunction("CURRENT_TIMESTAMP", SqlTypeName.TIMESTAMP);
- /**
- * The <code>CURRENT_DATETIME [(<i>precision</i>)]</code> function.
- */
- public static final SqlFunction CURRENT_DATETIME =
- new SqlAbstractTimeFunction("CURRENT_DA... |
codereview_java_data_2355 | TableScan scan,
int numRowsPerRoot,
int expectedTotalRows,
- int numExtraCallsToHasNext) throws IOException {
int totalRows = 0;
try (VectorizedTableScanIterable itr = new VectorizedTableScanIterable(scan, numRowsPerRoot, false)) {
CloseableIterator<ColumnarBatch> iterator = i... |
codereview_java_data_2385 | public void sendBeat() throws IOException, InterruptedException {
RaftPeer local = peers.local();
- if (ApplicationUtils.getStandaloneMode() || local.state != RaftPeer.State.LEADER){
return;
}
if (Loggers.RAFT.isDebugEnabled()) {
There should ... |
codereview_java_data_2396 | * The method {@link #upgradeRelativePaths(ServerContext, Ample.DataLevel)} was added for resolving
* and replacing all relative tablet file paths found in metadata tables with absolute paths during
* upgrade. Absolute paths are resolved by prefixing relative paths with a volume configured by the
- * user in a the... |
codereview_java_data_2400 | Logger.verbose(Logger.tags("Plugin"), "To native (Cordova plugin): callbackId: " + callbackId + ", service: " + service + ", action: " + action + ", actionArgs: " + actionArgs);
this.callCordovaPluginMethod(callbackId, service, action, actionArgs);
- } else if (type != null && type.equals("js.err... |
codereview_java_data_2412 | return visitor.union(schema, options);
case ARRAY:
- if (schema.getLogicalType() instanceof LogicalMap && AvroSchemaUtil.isKeyValueSchema(schema.getElementType())) {
return visitor.array(schema, visit(schema.getElementType(), visitor));
} else {
return visitor.array... |
codereview_java_data_2414 | toInit = (Processor) initialized;
} catch (ClassCastException e) {
throw new IllegalArgumentException(String.format(
- "The initialized object(%s) should be an instance of %s", initialized, Processor.class));
}
if (processor... |
codereview_java_data_2429 | // Carry over the type from the declaration
Class<?> nodeType = ((TypeNode) node.getNameDeclaration().getNode()).getType();
// FIXME : generic classes and class with generic super types could have the wrong type assigned here
- if (nodeType != null && !isGeneric(nodeTyp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.