repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/maven-surefire | 1,069 | surefire-its/src/test/resources/surefire-803-multiFailsafeExec-failureInFirst/src/test/java/org/apache/maven/surefire/test/FailingTest.java | package org.apache.maven.surefire.test;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
public class FailingTest
{
@Rule
public TestName name = new TestName();
@Test
public void defaultTestValueIs_Value()
{
assertThat( new App().getTest(), equalTo( "wrong" ) );
}
@Test
public void setTestAndRetrieveValue()
{
final App app = new App();
final String val = "foo";
app.setTest( val );
assertThat( app.getTest(), equalTo( "bar" ) );
}
@After
public void writeFile()
throws IOException
{
final File f = new File( "target/tests-run", getClass().getName() + ".txt" );
f.getParentFile().mkdirs();
try ( FileWriter w = new FileWriter( f, true ) )
{
w.write( name.getMethodName() );
}
}
}
|
apache/maven-surefire | 1,069 | surefire-its/src/test/resources/surefire-803-multiFailsafeExec-failureInFirst/src/test/java/org/apache/maven/surefire/test/SucceedingTest.java | package org.apache.maven.surefire.test;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
public class SucceedingTest
{
@Rule
public TestName name = new TestName();
@Test
public void defaultTestValueIs_Value()
{
assertThat( new App().getTest(), equalTo( "value" ) );
}
@Test
public void setTestAndRetrieveValue()
{
final App app = new App();
final String val = "foo";
app.setTest( val );
assertThat( app.getTest(), equalTo( val ) );
}
@After
public void writeFile()
throws IOException
{
final File f = new File( "target/tests-run", getClass().getName() + ".txt" );
f.getParentFile().mkdirs();
try ( FileWriter w = new FileWriter( f, true ) )
{
w.write( name.getMethodName() );
}
}
}
|
apache/mina-sshd | 1,153 | sshd-core/src/main/java/org/apache/sshd/server/forward/RejectAllForwardingFilter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sshd.server.forward;
/**
* A {@link ForwardingFilter} that rejects all requests
*/
public class RejectAllForwardingFilter extends StaticDecisionForwardingFilter {
public static final RejectAllForwardingFilter INSTANCE = new RejectAllForwardingFilter();
public RejectAllForwardingFilter() {
super(false);
}
}
|
apache/nifi | 1,146 | nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/command/process/ProcessBuilderProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.bootstrap.command.process;
/**
* Abstraction for creating a Process Builder
*/
public interface ProcessBuilderProvider {
/**
* Get Application Process Builder
*
* @return Process Builder for Application with command arguments configured
*/
ProcessBuilder getApplicationProcessBuilder();
}
|
apache/oodt | 1,150 | resource/src/main/java/org/apache/oodt/cas/resource/scheduler/SchedulerFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.oodt.cas.resource.scheduler;
/**
* @author woollard
* @version $Revision$
*
* <p>
* A Factory interface for creating implementations of {@link Scheduler}s.
* </p>
*
*/
public interface SchedulerFactory {
/**
* @return A new implementation of the {@link Scheduler} interface.
*/
Scheduler createScheduler();
}
|
apache/openjpa | 1,130 | openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TypeEntity.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.persistence.identity;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
/**
* JPA Entity
*
* @author Michael Vorburger
*/
@Entity
@Table(name = "test_type")
public class TypeEntity {
@Id
private Long id;
private String code;
// ...
}
|
apache/openjpa | 1,140 | openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/LengthExpression.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.persistence.query;
/**
* Denotes LENGTH(e) Expression.
*
* @author Pinaki Poddar
*
*/
public class LengthExpression extends UnaryOperatorExpression {
private static final long serialVersionUID = 1L;
public LengthExpression(Expression op) {
super(op, UnaryFunctionalOperator.LENGTH);
}
}
|
apache/openjpa | 1,160 | openjpa-junit5/src/test/java/org/apache/openjpa/junit5/OpenJPASupportTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.junit5;
import org.apache.openjpa.enhance.PersistenceCapable;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
@OpenJPASupport
class OpenJPASupportTest {
@Test
void ensureEnhanced() {
assertTrue(PersistenceCapable.class.isAssignableFrom(MyEntity.class));
}
}
|
apache/opennlp | 1,154 | opennlp-tools/src/test/java/opennlp/tools/util/wordvector/AbstractWordVectorTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package opennlp.tools.util.wordvector;
import java.io.InputStream;
public class AbstractWordVectorTest {
protected static final String FORMATS_BASE_DIR = "/opennlp/tools/util/wordvector/";
protected InputStream getResourceStream(String resource) {
return AbstractWordVectorTest.class.getResourceAsStream(FORMATS_BASE_DIR + resource);
}
}
|
apache/opennlp | 1,159 | opennlp-api/src/main/java/opennlp/tools/monitoring/TrainingMeasure.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package opennlp.tools.monitoring;
/**
* Enumeration of Training measures.
*/
public enum TrainingMeasure {
ACCURACY("Training Accuracy"),
LOG_LIKELIHOOD("Log Likelihood");
private String measureName;
TrainingMeasure(String measureName) {
this.measureName = measureName;
}
public String getMeasureName() {
return measureName;
}
}
|
apache/ozhera | 1,122 | ozhera-monitor/ozhera-monitor-service/src/main/java/org/apache/ozhera/monitor/service/model/QualityMarketQuery.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ozhera.monitor.service.model;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhangxiaowei6
*/
@Data
public class QualityMarketQuery implements Serializable {
private Integer id;
private String marketName;
private String serviceList;
private String remark;
}
|
apache/paimon | 1,147 | paimon-vfs/paimon-vfs-common/src/main/java/org/apache/paimon/vfs/VFSDatabaseIdentifier.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.paimon.vfs;
/** Identifier for database. */
public class VFSDatabaseIdentifier implements VFSIdentifier {
protected String databaseName;
public VFSDatabaseIdentifier(String databaseName) {
this.databaseName = databaseName;
}
public String databaseName() {
return databaseName;
}
}
|
apache/pekko-http | 1,154 | http-core/src/main/java/org/apache/pekko/http/javadsl/model/TransferEncoding.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* license agreements; and to You under the Apache License, version 2.0:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* This file is part of the Apache Pekko project, which was derived from Akka.
*/
/*
* Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com>
*/
package org.apache.pekko.http.javadsl.model;
import org.apache.pekko.http.impl.util.Util;
import org.apache.pekko.http.javadsl.model.headers.EntityTagRanges;
import java.util.Map;
/** @see TransferEncodings for convenience access to often used values. */
public abstract class TransferEncoding {
public abstract String name();
public abstract Map<String, String> getParams();
public static TransferEncoding createExtension(String name) {
return new org.apache.pekko.http.scaladsl.model.TransferEncodings.Extension(
name, Util.emptyMap);
}
public static TransferEncoding createExtension(String name, Map<String, String> params) {
return new org.apache.pekko.http.scaladsl.model.TransferEncodings.Extension(
name, Util.convertMapToScala(params));
}
}
|
apache/phoenix | 1,145 | phoenix-pherf/src/main/java/org/apache/phoenix/pherf/exception/FileLoaderRuntimeException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.phoenix.pherf.exception;
public class FileLoaderRuntimeException extends PherfRuntimeException {
@SuppressWarnings("unused")
public FileLoaderRuntimeException(String message) throws Exception {
super(message);
}
public FileLoaderRuntimeException(String message, Exception e) {
super(message, e);
}
}
|
apache/plc4x | 1,133 | plc4j/drivers/modbus/src/test/java/org/apache/plc4x/java/modbus/tcp/ModbusTcpAllDatatypesLittleEndianIT.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.plc4x.java.modbus.tcp;
import org.apache.plc4x.test.driver.DriverTestsuiteRunner;
public class ModbusTcpAllDatatypesLittleEndianIT extends DriverTestsuiteRunner {
public ModbusTcpAllDatatypesLittleEndianIT() {
super("/protocols/modbus/tcp/Modbus-all-datatypes-little-endian.xml");
}
}
|
apache/poi | 1,178 | poi/src/test/java/org/apache/poi/ss/usermodel/TestHSSFBorderStyle.java | /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
package org.apache.poi.ss.usermodel;
import org.apache.poi.hssf.HSSFITestDataProvider;
final class TestHSSFBorderStyle extends BaseTestBorderStyle {
public TestHSSFBorderStyle() {
super(HSSFITestDataProvider.instance);
}
} |
apache/polygene-java | 1,133 | libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/spi/RequestReader.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
*/
package org.apache.polygene.library.rest.server.spi;
import java.lang.reflect.Method;
import org.restlet.Request;
import org.restlet.resource.ResourceException;
/**
* TODO
*/
public interface RequestReader
{
Object[] readRequest( Request request, Method method )
throws ResourceException;
}
|
apache/qpid-broker-j | 1,155 | broker-core/src/main/java/org/apache/qpid/server/plugin/ConnectionValidator.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.qpid.server.plugin;
import org.apache.qpid.server.transport.AMQPConnection;
import org.apache.qpid.server.virtualhost.QueueManagingVirtualHost;
public interface ConnectionValidator extends Pluggable
{
boolean validateConnectionCreation(AMQPConnection<?> connection, final QueueManagingVirtualHost<?> virtualHost);
}
|
apache/ranger | 1,138 | ranger-examples/sampleapp/src/main/java/org/apache/ranger/examples/sampleapp/DefaultAuthorizer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ranger.examples.sampleapp;
import java.util.Set;
public class DefaultAuthorizer implements IAuthorizer {
public DefaultAuthorizer() {
}
public void init() {
}
public boolean authorize(String fileName, String accessType, String user, Set<String> userGroups) {
return true;
}
}
|
apache/rocketmq-flink | 1,126 | src/main/java/org/apache/flink/connector/rocketmq/legacy/common/serialization/KeyValueDeserializationSchema.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.connector.rocketmq.legacy.common.serialization;
import org.apache.flink.api.java.typeutils.ResultTypeQueryable;
import java.io.Serializable;
public interface KeyValueDeserializationSchema<T> extends ResultTypeQueryable<T>, Serializable {
T deserializeKeyAndValue(byte[] key, byte[] value);
}
|
apache/rocketmq | 1,156 | remoting/src/main/java/org/apache/rocketmq/remoting/exception/RemotingException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.rocketmq.remoting.exception;
public class RemotingException extends Exception {
private static final long serialVersionUID = -5690687334570505110L;
public RemotingException(String message) {
super(message);
}
public RemotingException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/royale-compiler | 1,135 | compiler-common/src/main/java/org/apache/royale/compiler/problems/StrictSemanticsProblem.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.royale.compiler.problems;
import org.apache.royale.compiler.tree.as.IASNode;
/**
* Base class of all strict mode semantic problems.
*/
public abstract class StrictSemanticsProblem extends SemanticProblem
{
public StrictSemanticsProblem(IASNode site)
{
super(site);
}
}
|
apache/samza | 1,138 | samza-api/src/main/java/org/apache/samza/container/grouper/stream/SystemStreamPartitionGrouperFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.samza.container.grouper.stream;
import org.apache.samza.config.Config;
/**
* Return an instance a SystemStreamPartitionGrouper per the particular implementation
*/
public interface SystemStreamPartitionGrouperFactory {
public SystemStreamPartitionGrouper getSystemStreamPartitionGrouper(Config config);
}
|
apache/samza | 1,180 | samza-api/src/main/java/org/apache/samza/drain/DrainMode.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.samza.drain;
/**
* Defines the type of drain operation.
* */
public enum DrainMode {
/**
* This mode signifies the default behavior of the drain operation.
* All intermediate streams and any samza managed state will be drained and the pipeline will be gracefully shutdown
* as a result. User state will not be drained.
* */
DEFAULT
}
|
apache/servicecomb-java-chassis | 1,084 | demo/demo-zeroconfig-registry/demo-zeroconfig-registry-client/src/main/java/org/apache/servicecomb/demo/zeroconfig/client/ClientModel.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.demo.zeroconfig.client;
import java.util.Date;
public class ClientModel {
private Date updateDate;
public Date getUpdateDate() {
return updateDate;
}
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
}
|
apache/servicecomb-java-chassis | 1,084 | swagger/swagger-invocation/invocation-core/src/main/java/org/apache/servicecomb/swagger/invocation/response/producer/ProducerResponseMapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.swagger.invocation.response.producer;
import jakarta.ws.rs.core.Response.StatusType;
import org.apache.servicecomb.swagger.invocation.Response;
public interface ProducerResponseMapper {
Response mapResponse(StatusType status, Object response);
}
|
apache/servicecomb-samples | 1,068 | java-chassis-integration-tests/springmvc-tests/simplified-mapping-with-springboot/src/test/java/org/apache/servicecomb/demo/springmvc/tests/SpringMvcSpringMain.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.demo.springmvc.tests;
import org.apache.servicecomb.springboot2.starter.EnableServiceComb;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
@EnableServiceComb
class SpringMvcSpringMain {
}
|
apache/servicecomb-toolkit | 1,133 | toolkit-maven-plugin/src/main/java/org/apache/servicecomb/toolkit/plugin/MavenPluginUtil.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.toolkit.plugin;
import org.apache.maven.project.MavenProject;
public class MavenPluginUtil {
private static final String PARENT_PROJECT_PACKAGING = "pom";
public static boolean isParentProject(MavenProject project){
return PARENT_PROJECT_PACKAGING.equals(project.getPackaging());
}
}
|
apache/servicemix | 1,141 | examples/cxf/cxf-ws-rm/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// START SNIPPET: service
package org.apache.servicemix.examples.cxf;
import javax.jws.WebService;
@WebService(endpointInterface = "org.apache.servicemix.examples.cxf.HelloWorld")
public class HelloWorldImpl implements HelloWorld {
public String sayHi(String text) {
return "Hello " + text;
}
}
// END SNIPPET: service
|
apache/shardingsphere-elasticjob-ui | 1,056 | shardingsphere-elasticjob-lite-ui/shardingsphere-elasticjob-lite-ui-backend/src/main/java/org/apache/shardingsphere/elasticjob/lite/ui/security/UserAccount.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.shardingsphere.elasticjob.lite.ui.security;
import lombok.Getter;
import lombok.Setter;
/**
* User account.
*/
@Getter
@Setter
public final class UserAccount {
private String username;
private String password;
}
|
apache/shardingsphere | 1,132 | test/it/parser/src/test/java/org/apache/shardingsphere/test/it/sql/parser/hive/InternalHiveParserIT.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.shardingsphere.test.it.sql.parser.hive;
import org.apache.shardingsphere.test.it.sql.parser.internal.InternalSQLParserIT;
import org.apache.shardingsphere.test.it.sql.parser.internal.InternalSQLParserITSettings;
@InternalSQLParserITSettings("Hive")
class InternalHiveParserIT extends InternalSQLParserIT {
}
|
apache/skywalking | 1,123 | test/e2e-v2/java-test-service/e2e-service-consumer/src/main/java/org/apache/skywalking/e2e/E2EConfiguration.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.e2e;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
@Data
@Configuration
@ConfigurationProperties("e2e")
public class E2EConfiguration {
private String providerBaseUrl;
}
|
apache/stormcrawler | 1,163 | core/src/main/java/org/apache/stormcrawler/parse/TextExtractor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to you under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.stormcrawler.parse;
public interface TextExtractor {
String INCLUDE_PARAM_NAME = "textextractor.include.pattern";
String EXCLUDE_PARAM_NAME = "textextractor.exclude.tags";
String NO_TEXT_PARAM_NAME = "textextractor.no.text";
String TEXT_MAX_TEXT_PARAM_NAME = "textextractor.skip.after";
String text(Object element);
}
|
apache/streampipes | 1,132 | streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/assets/AssetConstants.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.streampipes.manager.assets;
import org.apache.streampipes.storage.management.StorageDispatcher;
public class AssetConstants {
public static final String ASSET_BASE_DIR = StorageDispatcher
.INSTANCE
.getNoSqlStore()
.getSpCoreConfigurationStorage()
.get()
.getAssetDir();
}
|
apache/streampipes | 1,134 | streampipes-model/src/main/java/org/apache/streampipes/model/grounding/SimpleTopicDefinition.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.streampipes.model.grounding;
public class SimpleTopicDefinition extends TopicDefinition {
public SimpleTopicDefinition(String topicName) {
super(topicName);
}
public SimpleTopicDefinition() {
super();
}
public SimpleTopicDefinition(SimpleTopicDefinition other) {
super(other);
}
}
|
apache/struts | 1,112 | plugins/convention/src/test/java/org/apache/struts2/convention/actions/allowedmethods/sub/PackageLevelAllowedMethodsChildAction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.convention.actions.allowedmethods.sub;
import org.apache.struts2.convention.actions.allowedmethods.PackageLevelAllowedMethodsAction;
public class PackageLevelAllowedMethodsChildAction extends PackageLevelAllowedMethodsAction {
public String execute() { return null; }
}
|
apache/struts | 1,153 | core/src/main/java/org/apache/struts2/views/freemarker/StrutsClassTemplateLoader.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.views.freemarker;
import java.net.URL;
import org.apache.struts2.util.ClassLoaderUtil;
import freemarker.cache.URLTemplateLoader;
/**
*/
public class StrutsClassTemplateLoader extends URLTemplateLoader {
protected URL getURL(String name) {
return ClassLoaderUtil.getResource(name, getClass());
}
}
|
apache/struts | 1,165 | plugins/tiles/src/main/java/org/apache/tiles/request/attribute/package-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* Methods to get, set and remove attributes from different sources (like HTTP requests
* or sessions).
* By implementing {@link org.apache.tiles.request.attribute.AttributeExtractor},
* you can use a Map from {@link org.apache.tiles.request.collection} to manipulate the
* attributes of another class.
*/
package org.apache.tiles.request.attribute;
|
apache/syncope | 1,135 | core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/JEXLItemTransformer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.syncope.core.provisioning.api.data;
/**
* {@link ItemTransformer} implementing evaluation of JEXL expression defined for a given mapping item.
*/
public interface JEXLItemTransformer extends ItemTransformer {
void setPropagationJEXL(String propagationJEXL);
void setPullJEXL(String pullJEXL);
}
|
apache/syncope | 1,146 | core/spring/src/main/java/org/apache/syncope/core/spring/policy/PasswordPolicyException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.syncope.core.spring.policy;
public class PasswordPolicyException extends PolicyException {
private static final long serialVersionUID = 8072104484395278469L;
public PasswordPolicyException() {
super();
}
public PasswordPolicyException(final String message) {
super(message);
}
}
|
apache/tajo | 1,169 | tajo-common/src/test/java/org/apache/tajo/type/TestTypeProtobufEncoder.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tajo.type;
import static org.apache.tajo.type.TypeProtobufEncoder.decode;
import static org.apache.tajo.type.TypeProtobufEncoder.encode;
import static org.junit.Assert.assertEquals;
public class TestTypeProtobufEncoder extends TestTypeEncoder {
public void assertSerialize(Type type) {
assertEquals(type, decode(encode(type)));
}
} |
apache/tapestry-5 | 1,129 | tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/nested/ActionDemo.java | // Copyright 2006, 2007 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.integration.app1.pages.nested;
import org.apache.tapestry5.annotations.OnEvent;
import org.apache.tapestry5.annotations.Property;
public class ActionDemo
{
@Property
private Long number;
@OnEvent(component = "actionlink", value = "action")
public void onAction(Long number)
{
this.number = number;
}
public void onActivate(Long number)
{
this.number = number;
}
public Long onPassivate()
{
return number;
}
}
|
apache/tapestry-5 | 1,154 | tapestry-core/src/main/java/org/apache/tapestry5/AbstractOptionModel.java | // Copyright 2008 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5;
import java.util.Map;
/**
* Base class for implementing {@link OptionModel}. Subclasses must implement {@link
* org.apache.tapestry5.OptionModel#getLabel()} and {@link org.apache.tapestry5.OptionModel#getValue()} }.
*/
public abstract class AbstractOptionModel implements OptionModel
{
/**
* Returns false.
*/
public boolean isDisabled()
{
return false;
}
/**
* Returns null.
*/
public Map<String, String> getAttributes()
{
return null;
}
}
|
apache/tomcat | 1,179 | java/jakarta/security/auth/message/config/ServerAuthConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package jakarta.security.auth.message.config;
import java.util.Map;
import javax.security.auth.Subject;
import jakarta.security.auth.message.AuthException;
public interface ServerAuthConfig extends AuthConfig {
ServerAuthContext getAuthContext(String authContextID, Subject serviceSubject, Map<String,Object> properties)
throws AuthException;
}
|
apache/tomcat | 1,200 | java/org/apache/el/parser/AstTrue.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Generated By:JJTree: Do not edit this line. AstTrue.java */
package org.apache.el.parser;
import jakarta.el.ELException;
import org.apache.el.lang.EvaluationContext;
public final class AstTrue extends BooleanNode {
public AstTrue(int id) {
super(id);
}
@Override
public Object getValue(EvaluationContext ctx) throws ELException {
return Boolean.TRUE;
}
}
|
apache/tomee | 1,148 | examples/movies-complete-meta/src/main/java/org/superbiz/injection/tx/DeleteInterceptor.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.superbiz.injection.tx;
import jakarta.interceptor.AroundInvoke;
import jakarta.interceptor.InvocationContext;
/**
* @version $Revision$ $Date$
*/
public class DeleteInterceptor {
@AroundInvoke
public Object invoke(InvocationContext context) throws Exception {
// Log Delete
return context.proceed();
}
}
|
apache/tomee | 1,154 | examples/cdi-qualifier/src/main/java/org/superbiz/cdi/qualifier/Cash.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.superbiz.cdi.qualifier;
/**
*
* Implementation for {@link Payment} interfaces
* <br>
* This implementation have a qualifier annotation to help CDI choose the implementation correct.
*
* */
@PaymentQualifier(type=PaymentType.CASH)
public class Cash implements Payment {
@Override
public String pay() {
return "cash";
}
}
|
apache/tsfile | 1,152 | java/tsfile/src/main/java/org/apache/tsfile/exception/read/ReadProcessException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.tsfile.exception.read;
public class ReadProcessException extends Exception {
public ReadProcessException(String message) {
super(message);
}
public ReadProcessException(String message, Throwable cause) {
super(message, cause);
}
public ReadProcessException(Throwable cause) {
super(cause);
}
}
|
apache/twill | 1,158 | twill-yarn/src/main/java/org/apache/twill/internal/yarn/YarnContainerStatus.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.twill.internal.yarn;
import org.apache.hadoop.yarn.api.records.ContainerState;
/**
* This interface is for adapting differences in ContainerStatus between Hadoop 2.0 and 2.1.
*/
public interface YarnContainerStatus {
String getContainerId();
ContainerState getState();
int getExitStatus();
String getDiagnostics();
}
|
apache/wicket | 1,129 | wicket-core-tests/src/test/java/org/apache/wicket/markup/html/internal/headeritems/PageWithTwoHeaderItems.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup.html.internal.headeritems;
import org.apache.wicket.request.mapper.parameter.PageParameters;
public class PageWithTwoHeaderItems extends BasePage {
private static final long serialVersionUID = 1L;
public PageWithTwoHeaderItems(final PageParameters parameters) {
super(parameters);
}
}
|
apache/wicket | 1,146 | wicket-core/src/main/java/org/apache/wicket/request/resource/ContentDisposition.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.request.resource;
/**
* Represents content disposition of a resource
*
* @author Matej Knopp
*/
public enum ContentDisposition {
/**
* Inline resources are usually displayed within the browser window
*/
INLINE,
/**
* For attachment resources the browser should display a save dialog
*/
ATTACHMENT
} |
apache/wicket | 1,151 | wicket-cdi/src/main/java/org/apache/wicket/cdi/AbstractInjector.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.cdi;
/**
* Base class for injectors
*
* @author igor
*/
class AbstractInjector
{
public AbstractInjector()
{
}
protected <T> void postConstruct(T instance)
{
NonContextual.of(instance).postConstruct(instance);
}
protected <T> void inject(T instance)
{
NonContextual.of(instance).inject(instance);
}
}
|
apache/zeppelin | 1,148 | zeppelin-server/src/main/java/org/apache/zeppelin/rest/message/CheckpointNoteRequest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.zeppelin.rest.message;
/**
* CheckpointNoteRequest rest api request message.
*/
public class CheckpointNoteRequest {
private final String commitMessage;
public CheckpointNoteRequest(String commitMessage) {
this.commitMessage = commitMessage;
}
public String getCommitMessage() {
return commitMessage;
}
}
|
google-ai-edge/mediapipe | 1,152 | mediapipe/tasks/java/com/google/mediapipe/tasks/vision/core/RunningMode.java | // Copyright 2022 The MediaPipe Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.mediapipe.tasks.vision.core;
/**
* MediaPipe vision task running mode. A MediaPipe vision task can be run with three different
* modes:
*
* <ul>
* <li>IMAGE: The mode for running a mediapipe vision task on single image inputs.
* <li>VIDEO: The mode for running a mediapipe vision task on the decoded frames of a video.
* <li>LIVE_STREAM: The mode for running a mediapipe vision task on a live stream of input data,
* such as from camera.
* </ul>
*/
public enum RunningMode {
IMAGE,
VIDEO,
LIVE_STREAM
}
|
google/binnavi | 1,146 | src/main/java/com/google/security/zynamics/binnavi/API/debug/ThreadListenerAdapter.java | // Copyright 2011-2016 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.security.zynamics.binnavi.API.debug;
// / Adapter class for threads
/**
* Adapter class that can be used by objects that want to listen on threads but only need to process
* few events.
*/
public class ThreadListenerAdapter implements IThreadListener {
@Override
public void changedProgramCounter(final Thread thread) {
// Adapter method
}
@Override
public void changedRegisters(final Thread thread) {
// Adapter method
}
@Override
public void changedState(final Thread thread) {
// Adapter method
}
}
|
google/binnavi | 1,149 | src/main/java/com/google/security/zynamics/zylib/gui/zygraph/helpers/IZoomableGraph.java | // Copyright 2011-2016 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.security.zynamics.zylib.gui.zygraph.helpers;
import java.util.Collection;
/**
* Graphs that implement this interface unlock {@link GraphHelpers} functions that require the
* ability to zoom the graph.
*
* @param <NodeType> The type of the nodes in the graph.
*/
public interface IZoomableGraph<NodeType> {
/**
* Zooms the graph so far that all nodes in the list are visible.
*
* @param nodes List of nodes that should be displayed as big as possible.
*/
public void zoomToNodes(final Collection<NodeType> nodes);
}
|
google/closure-templates | 1,168 | java/src/com/google/template/soy/basetree/NodeVisitor.java | /*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.template.soy.basetree;
/**
* External interface for a node visitor. A visitor is basically a function implemented for some or
* all node classes, where the implementation can be different for each specific node class.
*
* @param <N> A more specific subinterface of Node, or just Node if not applicable.
* @param <R> The return type of this visitor.
*/
public interface NodeVisitor<N extends Node, R> {
/**
* Executes the function defined by this visitor.
*
* @param node The node to execute the function on.
*/
R exec(N node);
}
|
google/guava | 1,164 | guava-testlib/test/com/google/common/testing/RelationshipTesterTest.java | /*
* Copyright (C) 2012 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.common.testing;
import com.google.common.testing.RelationshipTester.Item;
import com.google.common.testing.RelationshipTester.ItemReporter;
import junit.framework.TestCase;
import org.jspecify.annotations.NullUnmarked;
/**
* Tests for {@link RelationshipTester}.
*
* @author Ben Yu
*/
@NullUnmarked
public class RelationshipTesterTest extends TestCase {
public void testNulls() {
new ClassSanityTester()
.setDefault(ItemReporter.class, /* itemReporter */ Item::toString)
.testNulls(RelationshipTester.class);
}
}
|
google/guava | 1,169 | android/guava/src/com/google/common/collect/SortedMultisetBridge.java | /*
* Copyright (C) 2012 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.common.collect;
import com.google.common.annotations.GwtIncompatible;
import java.util.SortedSet;
import org.jspecify.annotations.Nullable;
/**
* Superinterface of {@link SortedMultiset} to introduce a bridge method for {@code elementSet()},
* to ensure binary compatibility with older Guava versions that specified {@code elementSet()} to
* return {@code SortedSet}.
*
* @author Louis Wasserman
*/
@GwtIncompatible
interface SortedMultisetBridge<E extends @Nullable Object> extends Multiset<E> {
@Override
SortedSet<E> elementSet();
}
|
google/oss-fuzz | 1,182 | projects/jakarta-mail-api/HeaderTokenizerFuzzer.java |
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
import com.code_intelligence.jazzer.api.FuzzedDataProvider;
import jakarta.mail.internet.HeaderTokenizer;
import jakarta.mail.internet.ParseException;
public class HeaderTokenizerFuzzer{
public static void fuzzerTestOneInput(FuzzedDataProvider data) {
HeaderTokenizer ht = new HeaderTokenizer(data.consumeRemainingAsString());
HeaderTokenizer.Token tok;
try{
while ((tok = ht.next()).getType() != HeaderTokenizer.Token.EOF){}
}
catch(ParseException e){
return;
}
}
}
|
google/sagetv | 1,176 | test/java/sage/plugin/PluginWrapperTest.java | package sage.plugin;
import org.testng.annotations.Test;
import sage.Native;
import sage.TestUtils;
import static org.testng.Assert.*;
/**
* Created by seans on 03/09/16.
*/
public class PluginWrapperTest
{
@Test
public void testGetMD5() throws Exception
{
// Don't report failed native library loading
Native.LOG_NATIVE_FAILURES=false;
String md5="beec1608cf997d3acb42f0ab772b143f";
String testUrl = TestUtils.file2url(TestUtils.getTestResource("test-jar-1.0.zip"));
// verify it will look it up from the base url if the md5 is null
verifyMD5(md5, testUrl, null);
// verify it will look it up from the base url if the md5 is empty
verifyMD5(md5, testUrl, " ");
// verify it can use the http reference to md5
verifyMD5(md5, testUrl,
testUrl + ".md5");
// verify that if we give it an actual MD5 it works
verifyMD5(md5, "http://doesn.not.exist/file.jar", md5);
}
void verifyMD5(String md5, String jarUrl, String md5Url)
{
PluginWrapper.Package pack = new PluginWrapper.Package("JAR", jarUrl, md5Url, true);
assertEquals(md5Url, pack.getRawMD5());
assertEquals(md5, pack.getMD5());
}
} |
googleads/google-ads-java | 1,119 | google-ads-stubs-v19/src/main/java/com/google/ads/googleads/v19/common/ActivityStateInfoOrBuilder.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v19/common/criteria.proto
// Protobuf Java Version: 3.25.7
package com.google.ads.googleads.v19.common;
public interface ActivityStateInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v19.common.ActivityStateInfo)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* String value of the activity state. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return Whether the value field is set.
*/
boolean hasValue();
/**
* <pre>
* String value of the activity state. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return The value.
*/
java.lang.String getValue();
/**
* <pre>
* String value of the activity state. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return The bytes for value.
*/
com.google.protobuf.ByteString
getValueBytes();
}
|
googleads/google-ads-java | 1,119 | google-ads-stubs-v20/src/main/java/com/google/ads/googleads/v20/common/ActivityStateInfoOrBuilder.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v20/common/criteria.proto
// Protobuf Java Version: 3.25.7
package com.google.ads.googleads.v20.common;
public interface ActivityStateInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v20.common.ActivityStateInfo)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* String value of the activity state. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return Whether the value field is set.
*/
boolean hasValue();
/**
* <pre>
* String value of the activity state. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return The value.
*/
java.lang.String getValue();
/**
* <pre>
* String value of the activity state. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return The bytes for value.
*/
com.google.protobuf.ByteString
getValueBytes();
}
|
googleads/google-ads-java | 1,119 | google-ads-stubs-v21/src/main/java/com/google/ads/googleads/v21/common/ActivityStateInfoOrBuilder.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v21/common/criteria.proto
// Protobuf Java Version: 3.25.7
package com.google.ads.googleads.v21.common;
public interface ActivityStateInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v21.common.ActivityStateInfo)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* String value of the activity state. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return Whether the value field is set.
*/
boolean hasValue();
/**
* <pre>
* String value of the activity state. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return The value.
*/
java.lang.String getValue();
/**
* <pre>
* String value of the activity state. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return The bytes for value.
*/
com.google.protobuf.ByteString
getValueBytes();
}
|
googleapis/google-cloud-java | 1,055 | java-contact-center-insights/proto-google-cloud-contact-center-insights-v1/src/main/java/com/google/cloud/contactcenterinsights/v1/BulkDeleteConversationsResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.contactcenterinsights.v1;
public interface BulkDeleteConversationsResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.contactcenterinsights.v1.BulkDeleteConversationsResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,055 | java-contact-center-insights/proto-google-cloud-contact-center-insights-v1/src/main/java/com/google/cloud/contactcenterinsights/v1/TuneQaScorecardRevisionResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.contactcenterinsights.v1;
public interface TuneQaScorecardRevisionResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse)
com.google.protobuf.MessageOrBuilder {}
|
googlearchive/gwt-google-apis | 1,138 | search/search/src/com/google/gwt/search/client/AddressLookupMode.java | /*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.gwt.search.client;
import com.google.gwt.search.jsio.client.JSOpaque;
/**
* Used with {@link LocalSearch#setAddressLookupMode(AddressLookupMode)}.
*/
public enum AddressLookupMode {
/**
* Disables resolving addresses.
*/
DISABLED("DISABLED"),
/**
* Enables resolving addresses.
*/
ENABLED("ENABLED");
private final JSOpaque value;
private AddressLookupMode(String mode) {
value = new JSOpaque("$wnd.GlocalSearch.ADDRESS_LOOKUP_" + mode);
}
JSOpaque getValue() {
return value;
}
}
|
googleworkspace/java-samples | 1,166 | drive/snippets/drive_v3/src/test/java/TestFetchChanges.java | // Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import java.io.IOException;
import org.junit.Test;
// Unit test class for fetchChanges change snippet
public class TestFetchChanges extends BaseTest {
@Test
public void fetchChanges() throws IOException {
String startPageToken = FetchStartPageToken.fetchStartPageToken();
this.createTestBlob();
String newStartPageToken = FetchChanges.fetchChanges(startPageToken);
assertNotNull(newStartPageToken);
assertNotEquals(startPageToken, newStartPageToken);
}
}
|
hibernate/hibernate-orm | 1,065 | hibernate-core/src/test/java/org/hibernate/orm/test/any/annotations/IntegerProperty.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.any.annotations;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
@Entity
@Table(name="int_property")
public class IntegerProperty implements Property {
private Integer id;
private String name;
private Integer value;
public IntegerProperty() {
super();
}
public IntegerProperty(String name, Integer value) {
super();
this.name = name;
this.value = value;
}
public String asString() {
return Integer.toString(value);
}
public String getName() {
return name;
}
@Id
@GeneratedValue
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Column(name = "`value`")
public Integer getValue() {
return value;
}
public void setValue(Integer value) {
this.value = value;
}
public void setName(String name) {
this.name = name;
}
}
|
hibernate/hibernate-orm | 1,117 | hibernate-core/src/main/java/org/hibernate/query/criteria/JpaSearchOrder.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.query.criteria;
import jakarta.persistence.criteria.Nulls;
import org.hibernate.Incubating;
import org.hibernate.query.SortDirection;
/**
* Represents the search order for a recursive CTE (common table expression).
*
* @see JpaCteCriteria
*/
@Incubating
public interface JpaSearchOrder extends JpaCriteriaNode {
SortDirection getSortOrder();
/**
* Set the precedence of nulls for this search order element
*/
JpaSearchOrder nullPrecedence(Nulls precedence);
/**
* The precedence for nulls for this search order element
*/
Nulls getNullPrecedence();
/**
* Whether ascending ordering is in effect.
* @return boolean indicating whether ordering is ascending
*/
boolean isAscending();
/**
* Switch the ordering.
* @return a new <code>Order</code> instance with the reversed ordering
*/
JpaSearchOrder reverse();
/**
* Return the CTE attribute that is used for ordering.
* @return CTE attribute used for ordering
*/
JpaCteCriteriaAttribute getAttribute();
}
|
hibernate/hibernate-orm | 1,128 | hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/CustomNull.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.annotations.beanvalidation;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import jakarta.validation.constraints.Null;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Used to test constraint composition.
*/
@Null
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER})
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy = {})
public @interface CustomNull {
String message() default "{org.hibernate.validator.constraints.CustomNull.message}";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}
|
hibernate/hibernate-reactive | 1,079 | hibernate-reactive-core/src/main/java/org/hibernate/reactive/provider/service/ReactiveValuesMappingProducerProviderInitiator.java | /* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.reactive.provider.service;
import java.util.Map;
import org.hibernate.boot.registry.StandardServiceInitiator;
import org.hibernate.service.spi.ServiceRegistryImplementor;
import org.hibernate.sql.results.jdbc.spi.JdbcValuesMappingProducerProvider;
public class ReactiveValuesMappingProducerProviderInitiator implements StandardServiceInitiator<JdbcValuesMappingProducerProvider> {
/**
* Singleton access
*/
public static final ReactiveValuesMappingProducerProviderInitiator INSTANCE = new ReactiveValuesMappingProducerProviderInitiator();
@Override
public JdbcValuesMappingProducerProvider initiateService(
Map<String, Object> configurationValues,
ServiceRegistryImplementor registry) {
return ReactiveValuesMappingProducerProvider.INSTANCE;
}
@Override
public Class<JdbcValuesMappingProducerProvider> getServiceInitiated() {
return JdbcValuesMappingProducerProvider.class;
}
}
|
hibernate/hibernate-search | 1,079 | backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/client/impl/CustomConnectionKeepAliveStrategy.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.backend.elasticsearch.client.impl;
import org.apache.http.HttpResponse;
import org.apache.http.conn.ConnectionKeepAliveStrategy;
import org.apache.http.impl.client.DefaultConnectionKeepAliveStrategy;
import org.apache.http.protocol.HttpContext;
final class CustomConnectionKeepAliveStrategy implements ConnectionKeepAliveStrategy {
private final long maxKeepAlive;
CustomConnectionKeepAliveStrategy(long maxKeepAlive) {
this.maxKeepAlive = maxKeepAlive;
}
@Override
public long getKeepAliveDuration(HttpResponse response, HttpContext context) {
// get a keep alive from a request header if one is present
long keepAliveDuration = DefaultConnectionKeepAliveStrategy.INSTANCE.getKeepAliveDuration( response, context );
// if the keep alive timeout from a request is less than configured one - let's honor it:
if ( keepAliveDuration > 0 && keepAliveDuration < maxKeepAlive ) {
return keepAliveDuration;
}
return maxKeepAlive;
}
}
|
hibernate/hibernate-search | 1,087 | mapper/pojo-base/src/main/java/org/hibernate/search/mapper/pojo/mapping/definition/annotation/processing/impl/CompositeProjectionProcessor.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.mapper.pojo.mapping.definition.annotation.processing.impl;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.CompositeProjection;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.processing.MethodParameterMappingAnnotationProcessor;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.processing.MethodParameterMappingAnnotationProcessorContext;
import org.hibernate.search.mapper.pojo.mapping.definition.programmatic.MethodParameterMappingStep;
import org.hibernate.search.mapper.pojo.search.definition.binding.builtin.CompositeProjectionBinder;
public final class CompositeProjectionProcessor
implements MethodParameterMappingAnnotationProcessor<CompositeProjection> {
@Override
public void process(MethodParameterMappingStep mapping, CompositeProjection annotation,
MethodParameterMappingAnnotationProcessorContext context) {
mapping.projection( CompositeProjectionBinder.create() );
}
}
|
hibernate/hibernate-search | 1,117 | engine/src/main/java/org/hibernate/search/engine/mapper/scope/impl/MappedIndexScopeBuilderImpl.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.engine.mapper.scope.impl;
import org.hibernate.search.engine.backend.index.spi.IndexManagerImplementor;
import org.hibernate.search.engine.backend.mapping.spi.BackendMappingContext;
import org.hibernate.search.engine.backend.scope.spi.IndexScopeBuilder;
import org.hibernate.search.engine.mapper.scope.spi.MappedIndexScope;
import org.hibernate.search.engine.mapper.scope.spi.MappedIndexScopeBuilder;
public class MappedIndexScopeBuilderImpl<SR, R, E> implements MappedIndexScopeBuilder<SR, R, E> {
private final IndexScopeBuilder<SR> delegate;
public MappedIndexScopeBuilderImpl(IndexManagerImplementor firstIndexManager,
BackendMappingContext mappingContext, Class<SR> rootScope) {
this.delegate = firstIndexManager.createScopeBuilder( mappingContext, rootScope );
}
public void add(IndexManagerImplementor indexManager) {
indexManager.addTo( delegate );
}
@Override
public MappedIndexScope<SR, R, E> build() {
return new MappedIndexScopeImpl<>( delegate.build() );
}
}
|
hibernate/hibernate-validator | 1,057 | integrationtest/java/modules/test-utils/src/main/java/org/hibernate/validator/integrationtest/java/module/test/utils/Car.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.validator.integrationtest.java.module.test.utils;
import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertThat;
import static org.hibernate.validator.testutil.ConstraintViolationAssert.violationOf;
import jakarta.validation.Validation;
import jakarta.validation.Validator;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import org.hibernate.validator.HibernateValidator;
public class Car {
@NotNull
String text;
@Positive
Integer integer = -1;
public static boolean test() {
Validator validator = Validation.byProvider( HibernateValidator.class )
.configure()
.buildValidatorFactory()
.getValidator();
assertThat( validator.validate( new Car() ) ).containsOnlyViolations(
violationOf( NotNull.class ).withMessage( "must not be null" ),
violationOf( Positive.class ).withMessage( "must be greater than 0" )
);
return true;
}
}
|
hibernate/hibernate-validator | 1,084 | engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/bv/notempty/NotEmptyValidatorForCharSequence.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.validator.internal.constraintvalidators.bv.notempty;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
import jakarta.validation.constraints.NotEmpty;
/**
* Check that the character sequence is not null and its length is strictly superior to 0.
*
* @author Guillaume Smet
*/
public class NotEmptyValidatorForCharSequence implements ConstraintValidator<NotEmpty, CharSequence> {
/**
* Checks the character sequence is not {@code null} and not empty.
*
* @param charSequence the character sequence to validate
* @param constraintValidatorContext context in which the constraint is evaluated
* @return returns {@code true} if the character sequence is not {@code null} and not empty.
*/
@Override
public boolean isValid(CharSequence charSequence, ConstraintValidatorContext constraintValidatorContext) {
if ( charSequence == null ) {
return false;
}
return charSequence.length() > 0;
}
}
|
openjdk/jdk8 | 1,174 | langtools/test/com/sun/javadoc/testHtmlTableStyles/pkg2/TestUse.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg2;
import pkg1.*;
/**
* Testing use of TestTable.
*/
public class TestUse
{
public TestTable tTable;
}
|
openjdk/jdk8 | 1,174 | langtools/test/tools/javac/ClassLiterals/evalinit/java/lang/Integer.java | /*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// Dummy java.lang.Integer
package java.lang;
public final class Integer {
public static final Class TYPE = null;
}
|
openjdk/jdk8 | 1,175 | langtools/test/com/sun/javadoc/testTagInheritence/firstSentence/A.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package firstSentence;
public class A {
/**
* First sentence. Second sentence.
*/
public void m() {}
}
|
openjdk/jdk8 | 1,175 | langtools/test/tools/javac/diags/examples/AbstractMethodCantHaveBody.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.abstract.meth.cant.have.body
abstract class AbstractMethodCantHaveBody {
abstract void m() { }
}
|
openjdk/jdk8 | 1,179 | jdk/test/java/rmi/activation/Activatable/extLoadedImpl/CheckLoader.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public interface CheckLoader extends java.rmi.Remote {
boolean isCorrectContextLoader() throws java.rmi.RemoteException;
}
|
openjdk/jdk8 | 1,194 | jdk/test/sun/rmi/rmic/minimizeWrapperInstances/P.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface P extends Remote {
void m(boolean b) throws RemoteException;
}
|
openjdk/jtreg | 1,205 | test/libBuildArgs/lib/good/Good1.java | /*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package good;
import java.io.PrintStream;
public class Good1 {
public Good1(PrintStream out) {
out.println(getClass().getName());
}
}
|
openjdk/jtreg | 1,205 | test/libBuildArgs/lib/good/Good2.java | /*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package good;
import java.io.PrintStream;
public class Good2 {
public Good2(PrintStream out) {
out.println(getClass().getName());
}
}
|
openjdk/jtreg | 1,205 | test/reportOption/do-not-run/Error.java | /*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// tests in this directory should not be run
/*
* @test
* @run syntax-error
*/
public class Error {
public static void main(String... args) { }
} |
oracle/coherence | 1,138 | prj/test/functional/grpc-proxy-tck/src/main/java/grpc/proxy/NullStreamObserver.java | /*
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
*/
package grpc.proxy;
import io.grpc.stub.StreamObserver;
/**
* A null implementation of a {@link io.grpc.stub.StreamObserver} for
* use in tests where we do not care what happens to this observer.
*
* @author Jonathan Knight 2020.01.07
* @since 20.06
*/
public class NullStreamObserver<V>
implements StreamObserver<V>
{
// ----- constructors ---------------------------------------------------
private NullStreamObserver()
{
}
// ----- StreamObserver interface ---------------------------------------
@Override
public void onNext(V v)
{
}
@Override
public void onError(Throwable throwable)
{
}
@Override
public void onCompleted()
{
}
// ----- factory methods ------------------------------------------------
public static <T> StreamObserver<T> instance()
{
return new NullStreamObserver<>();
}
}
|
apache/commons-jcs | 1,120 | auxiliary-builds/jdk14/src/java/org/apache/commons/jcs/auxiliary/lateral/javagroups/behavior/IJGConstants.java | package org.apache.commons.jcs.auxiliary.lateral.javagroups.behavior;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
public interface IJGConstants
{
public static final String HANDLERNAME = "LATERAL_JG_CACHE";
public static final String DEFAULT_JG_GROUP_NAME = "JCS_CACHE";
public static final String RPC_JG_GROUP_NAME = "RPC_JCS_CACHE";
}
|
apache/commons-jexl | 1,155 | src/main/java/org/apache/commons/jexl3/parser/ASTIdentifierAccessSafe.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.jexl3.parser;
/**
* x?.identifier .
*/
public class ASTIdentifierAccessSafe extends ASTIdentifierAccess {
/**
*/
private static final long serialVersionUID = 1L;
ASTIdentifierAccessSafe(final int id) {
super(id);
}
@Override
public boolean isSafe() {
return true;
}
}
|
apache/crunch | 1,163 | crunch-core/src/main/java/org/apache/crunch/impl/mr/collect/UnionCollection.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.crunch.impl.mr.collect;
import org.apache.crunch.impl.dist.collect.BaseUnionCollection;
import org.apache.crunch.impl.dist.collect.PCollectionImpl;
import java.util.List;
public class UnionCollection<S> extends BaseUnionCollection<S> {
UnionCollection(List<? extends PCollectionImpl<S>> collections) {
super(collections);
}
}
|
apache/cxf | 1,148 | rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/visitor/VisitorState.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.jaxrs.ext.search.visitor;
/**
* Simple thread local storage implementation for helping
* search condition visitors to access its state across multiple
* visit calls when a given visitor is not created on per-request basis.
*/
public interface VisitorState<T> {
T get();
T remove();
void set(T value);
}
|
apache/cxf | 1,149 | rt/features/logging/src/main/java/org/apache/cxf/ext/logging/slf4j/Slf4jVerboseEventSender.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.ext.logging.slf4j;
import org.apache.cxf.ext.logging.event.LogEvent;
import org.apache.cxf.ext.logging.event.LogMessageFormatter;
public class Slf4jVerboseEventSender extends Slf4jEventSender {
@Override
protected String getLogMessage(LogEvent event) {
return LogMessageFormatter.format(event);
}
}
|
apache/dubbo | 1,160 | dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/merger/FloatSumMerger.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.rpc.cluster.merger;
import org.apache.dubbo.rpc.cluster.Merger;
import java.util.Arrays;
import java.util.Objects;
public class FloatSumMerger implements Merger<Float> {
@Override
public Float merge(Float... items) {
return Arrays.stream(items).filter(Objects::nonNull).reduce(0.0F, (f1, f2) -> f1 + f2);
}
}
|
apache/eagle | 1,136 | eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/environment/impl/SparkEnvironment.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eagle.app.environment.impl;
import org.apache.eagle.app.environment.AbstractEnvironment;
import com.typesafe.config.Config;
/**
* Spark Execution Environment Context.
*/
public class SparkEnvironment extends AbstractEnvironment {
public SparkEnvironment(Config config) {
super(config);
}
} |
apache/eventmesh | 1,105 | eventmesh-connectors/eventmesh-connector-slack/src/main/java/org/apache/eventmesh/connector/slack/config/SlackConnectServerConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.connector.slack.config;
import org.apache.eventmesh.common.config.connector.Config;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class SlackConnectServerConfig extends Config {
private boolean sinkEnable;
}
|
apache/eventmesh | 1,105 | eventmesh-connectors/eventmesh-connector-wecom/src/main/java/org/apache/eventmesh/connector/wecom/config/WeComConnectServerConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.connector.wecom.config;
import org.apache.eventmesh.common.config.connector.Config;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class WeComConnectServerConfig extends Config {
private boolean sinkEnable;
}
|
apache/eventmesh | 1,132 | eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/knative/KnativeSinkConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.common.config.connector.knative;
import org.apache.eventmesh.common.config.connector.SinkConfig;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class KnativeSinkConfig extends SinkConfig {
public SinkConnectorConfig connectorConfig;
}
|
apache/eventmesh | 1,132 | eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/pravega/PravegaSinkConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.common.config.connector.pravega;
import org.apache.eventmesh.common.config.connector.SinkConfig;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class PravegaSinkConfig extends SinkConfig {
public SinkConnectorConfig connectorConfig;
}
|
apache/fineract | 1,125 | fineract-core/src/main/java/org/apache/fineract/accounting/financialactivityaccount/data/FinancialActivityData.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.accounting.financialactivityaccount.data;
import lombok.Data;
import org.apache.fineract.accounting.glaccount.domain.GLAccountType;
@Data
public class FinancialActivityData {
private final Integer id;
private final String name;
private final GLAccountType mappedGLAccountType;
}
|
apache/fineract | 1,131 | fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupRolesReadPlatformService.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.portfolio.group.service;
import java.util.Collection;
import org.apache.fineract.portfolio.group.data.GroupRoleData;
public interface GroupRolesReadPlatformService {
Collection<GroupRoleData> retrieveGroupRoles(Long groupId);
GroupRoleData retrieveGroupRole(Long groupId, Long roleId);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.