id
stringlengths
29
30
content
stringlengths
152
2.6k
codereview_new_java_data_9861
public void setLabel() { assertEquals("test label", component.getLabel()); } -} \ No newline at end of file Needs line break. public void setLabel() { assertEquals("test label", component.getLabel()); } \ No newline at end of file +}
codereview_new_java_data_9862
Logger log() { FrontendUtils.deleteNodeModules(new File(npmFolder, "node_modules")); Assert.assertTrue( - "File from linked folder was removed, even if only link folder should be touched.", linkFolderFile.exists()); } Minor: Couldn't understand what is the me...
codereview_new_java_data_9863
private NodeTasks(Builder builder) { if (hillaTask != null) { hillaTask.configure(builder.getNpmFolder(), builder.getBuildDirectory()); } else { if (builder.endpointSourceFolder != null && builder.endpointSour...
codereview_new_java_data_9864
* For internal use only. May be renamed or removed in a future release. */ public interface TaskGenerateHilla extends FallibleCommand { - void configure(File projectDirectory, String buildDirectoryName); } Could it be a default method with empty body if the logic is in `execute` method? * For internal us...
codereview_new_java_data_9865
* For internal use only. May be renamed or removed in a future release. */ public interface TaskGenerateHilla extends FallibleCommand { default void configure(File projectDirectory, String buildDirectoryName) { } } Being a public API we should perhaps add Javadocs. For example we can make it explicit ...
codereview_new_java_data_9866
protected boolean hasListener(Class<? extends ComponentEvent> eventType) { * * @param eventType * the component event type - * @return A collection with all registered listeners. Empty if no listeners - * are found. */ protected Collection<?> getListeners( ...
codereview_new_java_data_9867
public boolean hasListener(Class<? extends ComponentEvent> eventType) { * * @param eventType * the component event type - * @return A collection with all registered listeners. Empty if no listeners - * are found. */ - protected Collection<?> getListeners( ...
codereview_new_java_data_9868
public void addListenerToComponent_getListeners_returnsCollection() { Assert.assertEquals(1, listeners.size()); listener.remove(); - Assert.assertFalse( - ComponentUtil.hasEventListener(component, PollEvent.class)); } } Should this line check that `ComponentUtil.getList...
codereview_new_java_data_9869
default void add(Component... components) { default void add(Collection<Component> components) { Objects.requireNonNull(components, "Components should not be null"); components.stream() - .map(c -> Objects.requireNonNull(c, "Component to add cannot be null...
codereview_new_java_data_9870
protected Stream<T> fetchFromProvider(int offset, int limit) { } private String getInvalidContractMessage(String method) { - return String.format("The data provider hasn't ever called %s() " + "method on the provided query. " + "It means that the the data provider breaks the contrac...
codereview_new_java_data_9871
public class TaskUpdateThemeImport implements FallibleCommand { TaskUpdateThemeImport(File npmFolder, ThemeDefinition theme, File frontendDirectory) { - this(npmFolder, theme, frontendDirectory, - new File(frontendDirectory, GENERATED)); - } - - TaskUpdateThemeImport(Fil...
codereview_new_java_data_9872
default Validator<V> getDefaultValidator() { * *&#47; * &#64;Override * public Validator getDefaultValidator() { - * return (value, valueContext) -> clientSideValid ? ValidationResult.ok() * : ValidationResult.error("Invalid date format"); * }...
codereview_new_java_data_9873
default Validator<V> getDefaultValidator() { * *&#47; * &#64;Override * public Validator getDefaultValidator() { - * return (value, valueContext) -> clientSideValid ? ValidationResult.ok() * : ValidationResult.error("Invalid date format"); * }...
codereview_new_java_data_9874
public void documentCssImport_externalAddedToHeadAsLink() { checkLogsForErrors(); final WebElement documentHead = getDriver() - .findElement(By.xpath("/html/head")); final List<WebElement> links = documentHead .findElements(By.tagName("link")); **nit:** ...
codereview_new_java_data_9875
private static String decode(String parameter) { @Override public String toString() { - return getQueryString(); } @Override nit: I'm personally not a big fan of toString methods without object identifier like class names, e.g. `QueryParameters(foo=bar)` instead of `foo=bar`. The oth...
codereview_new_java_data_9876
public <T, C extends Component & HasUrlParameter<T>> Optional<C> navigate( /** * Updates this UI to show the view corresponding to the given navigation - * target with the specified parameter. The parameter needs to be the same - * as defined in the route target HasUrlParameter. * <p> ...
codereview_new_java_data_9877
public class FeatureFlags implements Serializable { "com.vaadin.flow.server.frontend.NodeTestComponents$ExampleExperimentalComponent"); public static final Feature WEBPACK = new Feature( "Use Webpack for front-end builds (Deprecated)", - "webpackForFrontendBuild", "", true, nu...
codereview_new_java_data_9878
protected String getTestPath() { return Constants.PAGE_CONTEXT + "/index.html"; } - @Ignore("Vite handles web components differently. verify if #7005 affects also Vite") // test for #7005 @Test public void globalStylesAreUnderTheWebComponent() { ```suggestion @Ignore("Vite handl...
codereview_new_java_data_9879
public void setup() throws Exception { .isPresent()); createStubNode(false, true, baseDir); - createStubViteServer("ready in 500ms", 500, baseDir, true); // Prevent TaskRunNpmInstall#cleanUp from deleting node_modules new File(baseDir, "node_modules/.modul...
codereview_new_java_data_9880
public static <T> T getData(Component component, Class<T> type) { * Falls back to the router for the currently active VaadinService if the * component is not attached. * * @return a router instance * @throws IllegalStateException * if no router instance is available ```...
codereview_new_java_data_9881
default Validator<V> getDefaultValidator() { * * @see com.vaadin.flow.data.binder.Binder.BindingBuilderImpl#bind(ValueProvider, * Setter) - * @since 23.2 * * @return Registration of the added listener. */ ```suggestion * @since 2.7 ``` default Validator<V> getDefa...
codereview_new_java_data_9882
* {@link ValidationStatusChangeListener#validationStatusChanged(ValidationStatusChangeEvent)} * invoked. * - * @since 23.2 * * @param <V> * the value type ```suggestion * @since 2.7 ``` * {@link ValidationStatusChangeListener#validationStatusChanged(ValidationStatusChangeEvent)} * invo...
codereview_new_java_data_9883
* subscribe for each other's validation statuses and enable/disable or clear * values, etc. respectively. * - * @since 23.2 * * @see HasValidator * @see com.vaadin.flow.data.binder.Binder.BindingBuilderImpl#bind(ValueProvider, ```suggestion * @since 2.7 ``` * subscribe for each other's validation s...
codereview_new_java_data_9884
default Validator<V> getDefaultValidator() { * * @see com.vaadin.flow.data.binder.Binder.BindingBuilderImpl#bind(ValueProvider, * Setter) - * @since 23.2 * * @return Registration of the added listener. */ ```suggestion * @since 2.7 ``` default Validator<V> getDefa...
codereview_new_java_data_9885
* subscribe for each other's validation statuses and enable/disable or clear * values, etc. respectively. * - * @since 23.2 * * @see HasValidator * @see com.vaadin.flow.data.binder.Binder.BindingBuilderImpl#bind(ValueProvider, ```suggestion * @since 2.7 ``` * subscribe for each other's validation s...
codereview_new_java_data_9886
default Validator<V> getDefaultValidator() { * * @see com.vaadin.flow.data.binder.Binder.BindingBuilderImpl#bind(ValueProvider, * Setter) - * @since 23.2 * * @return Registration of the added listener. */ ```suggestion * @since 2.7 ``` default Validator<V> getDefa...
codereview_new_java_data_9887
* {@link ValidationStatusChangeListener#validationStatusChanged(ValidationStatusChangeEvent)} * invoked. * - * @since 23.2 * * @param <V> * the value type ```suggestion * @since 2.7 ``` * {@link ValidationStatusChangeListener#validationStatusChanged(ValidationStatusChangeEvent)} * invo...
codereview_new_java_data_9888
private void forceMessageHandling() { } // Call resynchronize to make sure a resynchronize request is sent - // in - // case endRequest did not already do this. registry.getMessageSender().resynchronize(); } } ```suggestion // C...
codereview_new_java_data_9889
/** * The listener interface for receiving {@link ValidationStatusChangeEvent} - * events. The classes that are interested in processing a Validation status - * changed event of field components e.g. - * {@link com.vaadin.flow.data.binder.Binder.BindingBuilderImpl}, register - * implementation of this interface v...
codereview_new_java_data_9890
default Validator<V> getDefaultValidator() { * Enables the implementing components to notify changes in their validation * status to the observers. This method is * <p> - * <strong>Note:</strong> This method should be overridden by the * implementing classes e.g. components, to enable the a...
codereview_new_java_data_9891
default Validator<V> getDefaultValidator() { * Enables the implementing components to notify changes in their validation * status to the observers. This method is * <p> - * <strong>Note:</strong> This method should be overridden by the * implementing classes e.g. components, to enable the a...
codereview_new_java_data_9892
public void navigateWithParameters_afterServerNavigation() UI ui = new UI(); initUI(ui, "", null); - Optional<FooBarParamNavigationTarget> newView = ui.navigate(FooBarParamNavigationTarget.class, new RouteParameters(new RouteParam("fooParam", "flu"), ...
codereview_new_java_data_9947
default void registerObservationRegistry(ObservationRegistry observationRegistry } /** - * True if this implementation is going to dela with not {@link ObservationRegistry#NOOP} instance. - * @return true if this implementation is going to dela with not {@link ObservationRegistry#NOOP} instance. * @since ...
codereview_new_java_data_9948
public RouterSpec<K, R> subFlowMapping(K key, IntegrationFlow subFlow) { * Use the next, after router, parent flow {@link MessageChannel} as a * {@link AbstractMessageRouter#setDefaultOutputChannel(MessageChannel)} of this router. * This option also disables {@link AbstractMappingMessageRouter#setChannelKeyFa...
codereview_new_java_data_9949
else if (this.metricsCaptor != null) { private boolean sendWithObservation(Message<?> message, long timeout) { MutableMessage<?> messageToSend = MutableMessage.of(message); - MessageSenderContext context = new MessageSenderContext(messageToSend, getComponentName()); return IntegrationObservation.PRODUCER.ob...
codereview_new_java_data_9950
private void registerGatewayProxyInstantiationPostProcessor(BeanDefinitionRegist if (!registry.containsBeanDefinition("gatewayProxyBeanDefinitionPostProcessor")) { BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(GatewayProxyInstantiationPostProcessor.class, - () -> new Ga...
codereview_new_java_data_9951
private Object processInternal(ParametersWrapper parameters) { private synchronized void initialize() { if (isProvidedMessageHandlerFactoryBean()) { - LOGGER.trace("Overriding default instance of MessageHandlerMethodFactory with provided one."); this.messageHandlerMethodFactory = getBeanFactory() ...
codereview_new_java_data_9952
public void futureVoidReply() throws Exception { reply.complete(null); } catch (InterruptedException ex) { ReflectionUtils.rethrowRuntimeException(ex); } }).start(); `Thread.currentThread.interrupt()` before rethrow. public void futureVoidReply() throws Exception { reply.complete(null)...
codereview_new_java_data_9953
public void destroy() { if (this.redisMessageListenerContainer != null) { try { this.redisMessageListenerContainer.destroy(); } catch (Exception ex) { throw new IllegalStateException(ex); Shouldnt we also set it to null here? public void destroy() { if (this.redisMessageListenerContainer...
codereview_new_java_data_9954
public void processBeanDefinition(String beanName, AnnotatedBeanDefinition beanD Poller poller = MessagingAnnotationUtils.resolveAttribute(annotations, "poller", Poller.class); Reactive reactive = MessagingAnnotationUtils.resolveAttribute(annotations, "reactive", Reactive.class); - Assert.state(reactive == nu...
codereview_new_java_data_9955
public final class TestingUtilities { // Non-instantiable utility class private TestingUtilities() { - throw new AssertionError(); } /** This is `private`, so it cannot be instantiate from the outside of the class. Even if you do some hardcore via reflection, it still does not harm since there is no any...
codereview_new_java_data_9956
public void setInterceptorFactoryChain(TcpConnectionInterceptorFactoryChain inte /** * If true, DNS reverse lookup is done on the remote ip address. - * Default false: not all environments (e.g. Docker containers) does a reliable DNS resolution. * @param lookupHost the lookupHost to set */ public void ...
codereview_new_java_data_10110
public ScanBuilder caseInsensitive() { } public ScanBuilder select(String... selectedColumns) { - this.tableScan = tableScan.select(ImmutableList.copyOf(selectedColumns)); return this; } public ScanBuilder select(Collection<String> columns) { - this.tableScan = tableScan.select...
codereview_new_java_data_10111
public void testDropBranchDoesNotExist() { } @Test - public void testDropBranchFailesForTag() throws NoSuchTableException { String tagName = "b1"; Table table = insertRows(); table.manageSnapshots().createTag(tagName, table.currentSnapshot().snapshotId()).commit(); Just noticed typo: Should be...
codereview_new_java_data_10112
public void filter(Filter[] filters) { .collect(Collectors.toList()); LOG.info( - "{}/{} tasks for table {} matched runtime file filter", filteredTasks.size(), tasks().size(), - table().name()); resetTasks(filteredTask...
codereview_new_java_data_10113
protected Statistics estimateStatistics(Snapshot snapshot) { // estimate stats using snapshot summary only for partitioned tables // (metadata tables are unpartitioned) if (!table.spec().isUnpartitioned() && filterExpressions.isEmpty()) { - LOG.debug("Using snapshot metadata to estimate statistics ...
codereview_new_java_data_10114
private static CaseInsensitiveStringMap addSnapshotId( scanOptions.putAll(options.asCaseSensitiveMap()); scanOptions.put(SparkReadOptions.SNAPSHOT_ID, value); scanOptions.remove(SparkReadOptions.AS_OF_TIMESTAMP); scanOptions.remove(SparkReadOptions.BRANCH); return new CaseInsensitive...
codereview_new_java_data_10115
private Pair<Table, Long> load(Identifier ident) throws NoSuchTableException { Preconditions.checkArgument( Stream.of(snapshotId, asOfTimestamp, branch, tag).filter(Objects::nonNull).count() <= 1, - "Can specify at most one of snapshot-id (%s), as-of-timestamp (%s), and snapshot-ref (%s)", ...
codereview_new_java_data_10129
public void performAction(FeedItem item, Fragment fragment, FeedItemFilter filte @Override public boolean willRemove(FeedItemFilter filter, FeedItem item) { - return filter.showNew; } } \ No newline at end of file This should be `true`, as the action is only shown on the playback history page...
codereview_new_java_data_10130
public boolean localFileAvailable() { public long getItemId() { return itemID; } - @Override public void onPlaybackStart() { startPosition = Math.max(position, 0); Unrelated change, please revert public boolean localFileAvailable() { public long getItemId() { ...
codereview_new_java_data_10131
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { .setTitle(getString(R.string.chapters_label)) .setView(onCreateView(getLayoutInflater())) .setPositiveButton(getString(R.string.close_label), null) //dismisses - .setNeutralButton("Rese...
codereview_new_java_data_10132
private static void upgrade(int oldVersion, Context context) { if (feedCounterSetting.equals("0")) { prefs.edit().putString(UserPreferences.PREF_DRAWER_FEED_COUNTER, "2").apply(); } - } - if (oldVersion < 2070095) { - long value = Long.parseLong(Sle...
codereview_new_java_data_10133
private static void upgrade(int oldVersion, Context context) { if (oldVersion < 2050000) { prefs.edit().putBoolean(UserPreferences.PREF_PAUSE_PLAYBACK_FOR_FOCUS_LOSS, true).apply(); } - if (oldVersion < 2070000) { // Migrate drawer feed counter setting to reflect remo...
codereview_new_java_data_10134
public void checkImmutableAcl() throws Exception { } } - /** - * Copied from ZooKeeper 3.8.1,(ZooKeeper.validateACL())[] for stand-alone testing, - * - * @see <a - * href="https://github.com/apache/zookeeper/blob/2e9c3f3ceda90aeb9380acc87b253bf7661b7794/zookeeper-server/src/main/java/org/apache...
codereview_new_java_data_10135
public enum Property { + " a comma or other reserved characters in a URI use standard URI hex" + " encoding. For example replace commas with %2C.", "1.6.0"), - INSTANCE_VOLUMES_CONFIG("instance.volumes.config.", null, PropertyType.PREFIX, "Properties in this category are used to pr...
codereview_new_java_data_10136
private void compactLocalityGroup(String lgName, Set<ByteSequence> columnFamilie try { Thread.sleep(500); } catch (InterruptedException e) { - Thread.interrupted(); throw new IllegalStateException( - "Interrupted while waiting for lo...
codereview_new_java_data_10137
public synchronized void upgradeZookeeper(ServerContext context, int oldestVersion = ROOT_TABLET_META_CHANGES; if (cv < oldestVersion) { String oldRelease = dataVersionToReleaseName(oldestVersion); - throw new UnsupportedOperationException("Upgrading from a version before " + oldRelease ...
codereview_new_java_data_10138
List<String> readReplFilesFromMetadata(final ServerContext context) { } void deleteReplTableFiles(final ServerContext context, final List<String> replTableFiles) { // write delete mutations boolean haveFailures = false; try (BatchWriter writer = context.createBatchWriter(MetadataTable.NAME)) { ...
codereview_new_java_data_10139
public int numArgs() { } public static void printClassPath(PrintWriter writer) { - try { - writer.print("Accumulo Shell Classpath: \n"); - final String javaClassPath = System.getProperty("java.class.path"); - if (javaClassPath == null) { - throw new IllegalStateException("java.class....
codereview_new_java_data_10140
import org.apache.accumulo.core.tabletingest.thrift.TabletIngestClientService.Client; public class TabletIngestClientServiceThriftClient extends ThriftClientTypes<Client> { public TabletIngestClientServiceThriftClient(String serviceName) { These names are not intuitive on their own. It would be helpful to ...
codereview_new_java_data_10141
public boolean recoverLogs(KeyExtent extent, Collection<Collection<String>> walo if (!closeTasksQueued.contains(sortId) && !sortsQueued.contains(sortId)) { AccumuloConfiguration aconf = manager.getConfiguration(); LogCloser closer = Property.createInstanceFromPropertyName(aconf, - ...
codereview_new_java_data_10142
private ServerContext createMockContext() { public void test() { final ServerContext context = createMockContext(); TableConfiguration conf = createMock(TableConfiguration.class); - // Eclipse might show @SuppressWarnings("removal") as unnecessary. - // Eclipse is wrong. See https://bugs.eclipse.org...
codereview_new_java_data_10143
protected FileSKVWriter openWriter(FileOptions options) throws IOException { if (options.dropCacheBehind) { EnumSet<CreateFlag> set = EnumSet.of(CreateFlag.SYNC_BLOCK, CreateFlag.CREATE); outputStream = fs.create(new Path(file), FsPermission.getDefault(), set, bufferSize, - (short) ...
codereview_new_java_data_10144
public CachableBuilder fsPath(FileSystem fs, Path dataFile, boolean dropCacheBeh // cache try { is.setDropBehind(Boolean.TRUE); } catch (UnsupportedOperationException e) { log.debug("setDropBehind not enabled for wal file: {}", dataFile); } catch (I...
codereview_new_java_data_10145
public CompactionStats call() throws IOException, CompactionCanceledException { // If compaction was cancelled then this may happen due to an // InterruptedException etc so suppress logging if (!env.isCompactionEnabled()) { - log.warn("{}", e.getMessage(), e); - } else { ...
codereview_new_java_data_10146
public void setProperty(String tableName, String property, String value) { public Map<String,String> modifyProperties(String tableName, Consumer<Map<String,String>> mapMutator) throws IllegalArgumentException, ConcurrentModificationException { - settings.putIfAbsent(tableName, new TreeMap<>...
codereview_new_java_data_10147
public void upgradeZookeeper(ServerContext context) { createScanServerNodes(context); } - private static final AtomicBoolean aclErrorOccurred = new AtomicBoolean(false); private void validateACLs(ServerContext context) { final ZooReaderWriter zrw = context.getZooReaderWriter(); final ZooKee...
codereview_new_java_data_10148
public ImportDestinationArguments importDirectory(String directory) { @Override public TimeType getTimeType(final String tableName) throws TableNotFoundException { - String tableId = tableIdMap().get(tableName); - if (tableId == null) { - throw new TableNotFoundException(null, tableName, "specified ...
codereview_new_java_data_10149
public void report(ScanAttempt.Result result) { }; } Map<TabletId,Collection<ScanAttemptImpl>> snapshot() { final long mutationCounterSnapshot; Suggest turning the comment you removed at line 114 into a method javadoc. Just so we now the top level goal of the method. This gives a little more conte...
codereview_new_java_data_10150
private static boolean zookeeperAvailable(ZooReaderWriter zoo) { /** * Create the version directory and the instance id path and file. The method tries to create the * directories and instance id file for all base directories provided unless an IOException is - * thrown. The IOException is not rethrown, b...
codereview_new_java_data_10151
public final void printRecords(Iterable<Entry<Key,Value>> scanner, FormatterConf } public static String repeat(String s, int c) { - return String.valueOf(s).repeat(Math.max(0, c)); } public void checkTableState() { ```suggestion return s.repeat(Math.max(0, c)); ``` public final void printRe...
codereview_new_java_data_10152
private final AtomicBoolean keepRunning = new AtomicBoolean(true); public enum TxInfo { - REPO_TARGET, AUTO_CLEAN, EXCEPTION, RETURN_VALUE; } private class TransactionRunner implements Runnable { ```suggestion REPO_TARGET, AUTO_CLEAN, EXCEPTION, RETURN_VALUE ``` private final AtomicBoole...
codereview_new_java_data_10153
private static Set<ByteSequence> getCfSet(Collection<ByteSequence> columnFamilie if (columnFamilies instanceof Set<?>) { cfSet = (Set<ByteSequence>) columnFamilies; } else { - cfSet = new HashSet<>(columnFamilies); } } return cfSet; Could do the following, might be bette...
codereview_new_java_data_10154
private long removeBlipCandidates(GarbageCollectionEnvironment gce, @VisibleForTesting /** - * */ protected void ensureAllTablesChecked(Set<TableId> tableIdsBefore, Set<TableId> tableIdsSeen, Set<TableId> tableIdsAfter) { // if a table was added or deleted during this run, it is acceptab...
codereview_new_java_data_10155
public long getCandidatesStat() { return candidates; } - @Override - public boolean isRootTable() { - return level == DataLevel.ROOT; - } - - @Override - public boolean isMetadataTable() { - return level == DataLevel.METADATA; - } - @Override public Set<TableId> getCandidateTableIDs() { - ...
codereview_new_java_data_10156
import static org.apache.accumulo.server.gc.GcVolumeUtil.ALL_VOLUMES_PREFIX; -import java.util.Objects; - import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.data.TableId; -import org.apache.accumulo.core.gc.ReferenceDirectory; import org.apache.accumulo.core.metadata.schema.MetadataSche...
codereview_new_java_data_10217
import com.nawforce.apexparser.ApexLexer; -@Deprecated @InternalApi -public final class ApexCommentBuilder { private final SourceCodePositioner sourceCodePositioner; private final CommentInformation commentInfo; Since this is a new class, we can directly create this in an "internal" package, e.g. `n...
codereview_new_java_data_10218
public List<JFieldSymbol> getDeclaredFields() { @Override public PSet<SymAnnot> getDeclaredAnnotations() { - return SymbolResolutionPass.getSymbolicAnnotations(node); } @Override todo maybe make the modifierList cache them. public List<JFieldSymbol> getDeclaredFields() { ...
codereview_new_java_data_10219
final class BoxedPrimitive extends ClassTypeImpl { @Override public JClassType withAnnotations(PSet<SymAnnot> newTypeAnnots) { - if (newTypeAnnots.equals(this.getTypeAnnotations())) { return this; } return new BoxedPrimitive( ```suggestion if (newTypeAnnots.i...
codereview_new_java_data_10220
private boolean validateCRUDCheckPresent(final ApexNode<?> node, final Object da addViolation(data, node); return true; } - if (isImproperDMLCheck && userMode) { - addViolation(data, node); - return true; - } - ...
codereview_new_java_data_10221
private boolean validateCRUDCheckPresent(final ApexNode<?> node, final Object da addViolation(data, node); return true; } - if (isImproperDMLCheck && userMode) { - addViolation(data, node); - return true; - } - ...
codereview_new_java_data_10222
public enum CliExitCode { * This is exit code {@code 1}. */ ERROR(1), - // Todo USAGE_ERROR(2), /** * No errors, but PMD found violations. This is exit code {@code 4}. ```suggestion /* * Indicates a problem with the CLI parameters: either a required * parameter is...
codereview_new_java_data_10223
public class ClassNamingConventionsRule extends AbstractNamingConventionRule<AST private final PropertyDescriptor<Pattern> utilityClassRegex = defaultProp("utility class").build(); private final PropertyDescriptor<Pattern> testClassRegex = defaultProp("test class") .desc("Regex which applies to ...
codereview_new_java_data_10224
public class ASTArrayLoadExpression extends AbstractApexNode.Single<ArrayExpression> { - @Deprecated - @InternalApi - public ASTArrayLoadExpression(ArrayExpression arrayExpression) { super(arrayExpression); } Just FYI: The constructor is deprecated+internal API because it should have bee...
codereview_new_java_data_10225
public Object visit(ASTMethod node, Object data) { } private Object checkForRunAsStatements(ApexNode<?> node, Object data) { - final List<ASTBlockStatement> blockStatements = node.findDescendantsOfType(ASTBlockStatement.class); - final List<ASTRunAsBlockStatement> runAsStatements = new ArrayL...
codereview_new_java_data_10226
private static String getUnixExample() { return "For example on *nix: " + PMD.EOL + launchCmd + " -dir /home/workspace/src/main/java/code -f html -rulesets rulesets/java/quickstart.xml,category/java/codestyle.xml" + PMD.EOL + launchCmd + " -d ./src/main/java/code -R rulesets/...
codereview_new_java_data_10227
private void report(CPD cpd) throws ReportException { log("No duplicates over " + minimumTokenCount + " tokens found", Project.MSG_INFO); } CPDReportRenderer renderer = createRenderer(); - CPDReport report = new CPDReport(cpd.getMatches(), cpd.getNumberOfTokensPerFile()); ...
codereview_new_java_data_10228
import java.util.Collections; import java.util.Iterator; import java.util.Map; public class CPDReport { private final Iterator<Match> matches; private final Map<String, Integer> numberOfTokensPerFile; CPDReport(final Iterator<Match> matches, final Map<String, Integer> numberOfTokensPerFile) { ...
codereview_new_java_data_10229
import java.util.Collections; import java.util.Iterator; import java.util.Map; public class CPDReport { private final Iterator<Match> matches; private final Map<String, Integer> numberOfTokensPerFile; CPDReport(final Iterator<Match> matches, final Map<String, Integer> numberOfTokensPerFile) { ...
codereview_new_java_data_10230
import java.io.IOException; import java.io.Writer; import net.sourceforge.pmd.cpd.CPDReport; public class CPDRendererAdapter implements CPDReportRenderer { private final CPDRenderer renderer; I'll mark this as internal API, since this is just a utility for us to avoid changing all renderers now (which ...
codereview_new_java_data_10364
public FilamentTask() { } @Internal - public FilamentExtension getExtension() { return FilamentExtension.get(getProject()); } } ```suggestion protected FilamentExtension getExtension() { ``` (Assuming it compiles ofc) public FilamentTask() { } @Internal + protected FilamentExtension getExtensi...
codereview_new_java_data_10541
public void onCatalystInstanceDestroy() { } private static boolean isRunningOnEmulator() { return Build.FINGERPRINT.startsWith("generic") || Build.FINGERPRINT.startsWith("unknown") || Build.MODEL.contains("google_sdk") Can you add a comment explaining where this code co...
codereview_new_java_data_10587
public static void main(String[] args) { propertyStringList.setValue(0, "Output0"); System.out.println(propertyStringList.toString()); System.out.println("Test finished!"); System.exit(0); } catch(IOException ex){ It doesn't look like there's an output named "Output0". Wh...
codereview_new_java_data_10920
public class OutputSchema implements Extension { public static final String OUTPUT_SCHEMA = "workflow-output-schema"; // this data structure will be removed when migrating to 0.9, but for now it makes sense to reuse it rather than creating a new one // see https://github.com/serverlessworkflow/specifica...
codereview_new_java_data_10921
<T extends Model> ProcessInstance<T> createProcessInstance(Process<T> process, S <T extends MappableToModel<R>, R> Optional<R> delete(Process<T> process, String id); - <T extends MappableToModel<P>, P extends MappableToModel<R>, R> Optional<R> update(Process<P> process, String id, T resource); - <T ex...
codereview_new_java_data_10922
public static void mergeSchemas(OpenAPI targetSchema, Collection<OpenAPI> srcSch } } - private static final Optional<SwaggerSchemaProvider> getSchemaSupplier(Optional<WorkflowModelValidator> validator) { return validator.filter(SwaggerSchemaProvider.class::isInstance).map(SwaggerSchemaProvi...
codereview_new_java_data_10923
public final class ServerlessWorkflowOASFilter implements OASFilter { - private Collection<OpenAPI> schemasInfo; public ServerlessWorkflowOASFilter(Collection<OpenAPI> schemasInfo) { this.schemasInfo = schemasInfo; ```suggestion private final Collection<OpenAPI> schemasInfo; ``` pub...
codereview_new_java_data_10924
private String addNashornJavaScriptEngineIfNecessary(String cp) { } private boolean requiresNashornJavaScriptEngine() { - String version = System.getProperty("java.specification.version"); - if (version.startsWith("1.")) { - version = version.substring(2); - } - retur...
codereview_new_java_data_10925
public final Index addIndex(SessionLocal session, String indexName, int indexId, @Override public final boolean isView() { - return false; } @Override This method should return `true`, otherwise this view with its definition will not be listed in `INFORMATION_SCHEMA.VIEWS`. public final Index addIndex(...
codereview_new_java_data_10926
public Database(ConnectionInfo ci, String cipher) { this.filePasswordHash = ci.getFilePasswordHash(); this.databaseName = databaseName; this.databaseShortName = parseDatabaseShortName(); - this.maxLengthInplaceLob = persistent ? Constants.DEFAULT_MAX_LENGTH_INPLACE_LOB : Integer.MAX_V...