repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/kylin
1,152
src/query-service/src/main/java/org/apache/kylin/rest/request/SaveSqlRequest.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.kylin.rest.request; import org.apache.kylin.metadata.insensitive.ProjectInsensitiveRequest; import lombok.Data; /** * @author xduo * */ @Data public class SaveSqlRequest implements ProjectInsensitiveRequest { private String name; private String sql; private String project; private String description; }
apache/linkis
1,084
linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/java/org/apache/linkis/manager/rm/exception/RMLockFailedRetryException.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.linkis.manager.rm.exception; import org.apache.linkis.common.exception.LinkisRetryException; public class RMLockFailedRetryException extends LinkisRetryException { public RMLockFailedRetryException(int errCode, String desc) { super(errCode, desc); } }
apache/linkis
1,098
linkis-engineconn-plugins/openlookeng/src/main/java/org/apache/linkis/engineplugin/openlookeng/exception/OpenLooKengStateInvalidException.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.linkis.engineplugin.openlookeng.exception; import org.apache.linkis.common.exception.ErrorException; public class OpenLooKengStateInvalidException extends ErrorException { public OpenLooKengStateInvalidException(int errCode, String desc) { super(errCode, desc); } }
apache/linkis
1,112
linkis-public-enhancements/linkis-cs-server/src/main/java/org/apache/linkis/cs/contextcache/metric/ContextIDMetric.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.linkis.cs.contextcache.metric; @Deprecated public interface ContextIDMetric extends Metrtic { int getUsedCount(); void addCount(); long getMemory(); void setMemory(long memory); long getCachedTime(); long getLastAccessTime(); void setLastAccessTime(long accessTime); }
apache/logging-log4j2
1,135
log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/EquinoxLoadApiBundleTest.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.logging.log4j.osgi.tests; import org.eclipse.osgi.launch.EquinoxFactory; /** * Tests loading the Core bundle into an Eclipse Equinox OSGi container. */ public class EquinoxLoadApiBundleTest extends AbstractLoadBundleTest { public EquinoxLoadApiBundleTest() { super(new EquinoxFactory()); } }
apache/logging-log4j2
1,150
log4j-1.2-api/src/main/java/org/apache/log4j/spi/HierarchyEventListener.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.log4j.spi; import org.apache.log4j.Appender; import org.apache.log4j.Category; /** * Listen to events occurring within a Hierarchy. * * @since 1.2 * */ public interface HierarchyEventListener { void addAppenderEvent(Category cat, Appender appender); void removeAppenderEvent(Category cat, Appender appender); }
apache/logging-log4j2
1,155
log4j-taglib/src/main/java/org/apache/logging/log4j/taglib/InfoTag.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.logging.log4j.taglib; import org.apache.logging.log4j.Level; /** * This class implements the {@code <log:info>} tag. * * @since 2.0 */ public class InfoTag extends LoggingMessageTagSupport { private static final long serialVersionUID = 1L; @Override protected Level getLevel() { return Level.INFO; } }
apache/logging-log4j2
1,155
log4j-taglib/src/main/java/org/apache/logging/log4j/taglib/WarnTag.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.logging.log4j.taglib; import org.apache.logging.log4j.Level; /** * This class implements the {@code <log:warn>} tag. * * @since 2.0 */ public class WarnTag extends LoggingMessageTagSupport { private static final long serialVersionUID = 1L; @Override protected Level getLevel() { return Level.WARN; } }
apache/lucene
1,201
lucene/misc/src/java/module-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. */ /** Index tools and other miscellaneous code */ module org.apache.lucene.misc { requires org.apache.lucene.core; exports org.apache.lucene.misc; exports org.apache.lucene.misc.document; exports org.apache.lucene.misc.index; exports org.apache.lucene.misc.search; exports org.apache.lucene.misc.store; exports org.apache.lucene.misc.util; exports org.apache.lucene.misc.util.fst; }
apache/maven-plugins
1,108
maven-project-info-reports-plugin/src/test/java/org/apache/maven/report/projectinfo/stubs/PluginManagementStub.java
package org.apache.maven.report.projectinfo.stubs; /* * 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. */ /** * @author Nick Stolwijk * @version $Id$ * @since 2.1 */ public class PluginManagementStub extends ProjectInfoProjectStub { @Override protected String getPOM() { return "plugin-management-plugin-config.xml"; } }
apache/metamodel
1,152
core/src/main/java/org/apache/metamodel/intercept/RowInsertionInterceptor.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.metamodel.intercept; import org.apache.metamodel.insert.RowInsertionBuilder; /** * An {@link Interceptor} for {@link RowInsertionBuilder}, allowing for * interception of "insert into table" operations before they are executed. */ public interface RowInsertionInterceptor extends Interceptor<RowInsertionBuilder> { }
apache/mina-sshd
1,157
sshd-common/src/main/java/org/apache/sshd/common/io/IoServiceFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.sshd.common.io; import org.apache.sshd.common.Closeable; /** * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> */ public interface IoServiceFactory extends Closeable, IoServiceEventListenerManager { IoConnector createConnector(IoHandler handler); IoAcceptor createAcceptor(IoHandler handler); }
apache/openwebbeans
1,111
webbeans-impl/src/test/java/org/apache/webbeans/test/injection/injectionpoint/beans/ProducerMethodInjectionPointOwner.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.injection.injectionpoint.beans; import jakarta.enterprise.inject.spi.InjectionPoint; public class ProducerMethodInjectionPointOwner extends AbstractInjectionPointOwner { public ProducerMethodInjectionPointOwner(InjectionPoint ip) { injectionPoint = ip; } }
apache/openwebbeans
1,111
webbeans-impl/src/test/java/org/apache/webbeans/test/profields/beans/stringproducer/GetterStringProducerBean.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.profields.beans.stringproducer; import jakarta.enterprise.inject.Produces; import jakarta.inject.Named; public class GetterStringProducerBean { @Produces @Named("products") public String getProducts() { return "Sucess from getProducts"; } }
apache/ozhera
1,094
ozhera-intelligence/ozhera-intelligence-domain/src/main/java/org/apache/ozhera/intelligence/domain/rootanalysis/MetricRangeResponseVector.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.intelligence.domain.rootanalysis; import lombok.Data; import lombok.ToString; import java.io.Serializable; @Data @ToString public class MetricRangeResponseVector implements Serializable { private String status; private MetricDataRangeVector data; }
apache/ozhera
1,143
ozhera-app/app-service/src/main/java/org/apache/ozhera/app/dao/mapper/HeraAppEnvMapper.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.app.dao.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ozhera.app.model.HeraAppEnv; import org.apache.ibatis.annotations.Mapper; /** * @version 1.0 * @description * @date 2022/11/10 9:57 */ @Mapper public interface HeraAppEnvMapper extends BaseMapper<HeraAppEnv> { }
apache/paimon-webui
1,142
paimon-web-api/src/main/java/org/apache/paimon/web/api/action/context/ActionContext.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.api.action.context; import java.util.List; /** The context of action which converts the user-defined action to command line. */ public interface ActionContext { String name(); /** Converts the user-defined action to command line. */ List<String> getArguments(); String getJarPath(); }
apache/paimon
1,169
paimon-core/src/main/java/org/apache/paimon/lookup/BulkLoader.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.lookup; /** Bulk loader for {@link State}, incoming keys must be sorted, and there must be no repetition. */ public interface BulkLoader { void finish(); /** Exception during writing. */ class WriteException extends Exception { public WriteException(Throwable cause) { super(cause); } } }
apache/plc4x
1,136
plc4j/drivers/knxnetip/src/test/java/org/apache/plc4x/java/knxnetip/KnxNetIpParserSerializerTest.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.knxnetip; import org.apache.plc4x.test.parserserializer.ParserSerializerTestsuiteRunner; public class KnxNetIpParserSerializerTest extends ParserSerializerTestsuiteRunner { public KnxNetIpParserSerializerTest() { super("/protocols/knxnetip/ParserSerializerTestsuite.xml"); } }
apache/poi
1,190
poi/src/main/java/org/apache/poi/poifs/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. ==================================================================== */ /** * Poor Obfuscation Implementation FileSystem APIs implement the OLE 2 Compound Document format in * pure Java. All POI subprojects are based upon this API. * * @see org.apache.poi.hssf * @see org.apache.poi.hpsf */ package org.apache.poi.poifs;
apache/polygene-java
1,138
libraries/restlet/src/main/java/org/apache/polygene/library/restlet/crud/EntityRef.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.crud; import org.apache.polygene.api.property.Property; import org.apache.polygene.library.restlet.RestLink; public interface EntityRef { Property<String> name(); Property<RestLink> get(); Property<RestLink> put(); Property<RestLink> delete(); }
apache/polygene-java
1,146
samples/rental/src/main/java/org/apache/polygene/sample/rental/domain/Period.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.sample.rental.domain; import java.time.LocalDate; import org.apache.polygene.api.property.Property; import org.apache.polygene.api.value.ValueComposite; public interface Period extends ValueComposite { Property<LocalDate> startOfPeriod(); Property<LocalDate> endOfPeriod(); }
apache/qpid-broker-j
1,133
bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/upgrade/DatabaseEntryCallback.java
/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.qpid.server.store.berkeleydb.upgrade; import com.sleepycat.je.Database; import com.sleepycat.je.DatabaseEntry; import com.sleepycat.je.Transaction; public interface DatabaseEntryCallback { void processEntry(Database database, Transaction transaction, DatabaseEntry key, DatabaseEntry value); }
apache/qpid-broker-j
1,135
broker-codegen/src/main/java/org/apache/qpid/server/model/SystemConfigFactoryConstructor.java
/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.qpid.server.model; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.CLASS) @Target(ElementType.CONSTRUCTOR) public @interface SystemConfigFactoryConstructor { }
apache/qpid-broker-j
1,155
broker-core/src/main/java/org/apache/qpid/server/util/DataUrlUtils.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.qpid.server.util; import java.util.Base64; public class DataUrlUtils { public static String getDataUrlForBytes(final byte[] bytes) { StringBuilder inlineURL = new StringBuilder("data:;base64,"); inlineURL.append(Base64.getEncoder().encodeToString(bytes)); return inlineURL.toString(); } }
apache/reef
1,129
lang/java/reef-runtime-mesos/src/main/java/org/apache/reef/runtime/mesos/driver/parameters/MesosMasterIp.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.mesos.driver.parameters; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; /** * The ip address of Mesos Master. */ @NamedParameter(doc = "The ip address of Mesos Master") public final class MesosMasterIp implements Name<String> { }
apache/rocketmq
1,165
proxy/src/main/java/org/apache/rocketmq/proxy/processor/QueueSelector.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.proxy.processor; import org.apache.rocketmq.proxy.common.ProxyContext; import org.apache.rocketmq.proxy.service.route.AddressableMessageQueue; import org.apache.rocketmq.proxy.service.route.MessageQueueView; public interface QueueSelector { AddressableMessageQueue select(ProxyContext ctx, MessageQueueView messageQueueView); }
apache/seatunnel-web
1,099
seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/request/job/transform/FieldMapperTransformOptions.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.request.job.transform; import lombok.Data; import java.util.List; @Data public class FieldMapperTransformOptions implements TransformOptions { List<ChangeOrder> changeOrders; List<RenameField> renameFields; List<DeleteField> deleteFields; }
apache/sedona
1,161
spark/common/src/main/java/org/apache/sedona/core/monitoring/Metrics.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.sedona.core.monitoring; import org.apache.spark.SparkContext; import org.apache.spark.util.LongAccumulator; public class Metrics { public static LongAccumulator createMetric(SparkContext sc, String name) { LongAccumulator acc = new LongAccumulator(); sc.register(acc, "sedona.spatialjoin." + name); return acc; } }
apache/servicecomb-java-chassis
1,086
foundations/foundation-protobuf/src/test/java/org/apache/servicecomb/foundation/protobuf/internal/schema/scalar/TestFixed32Schema.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.foundation.protobuf.internal.schema.scalar; public class TestFixed32Schema extends TestNumberBaseSchema { public TestFixed32Schema() { minValue = Integer.MIN_VALUE; maxValue = Integer.MAX_VALUE; initFields("fixed32", "objFixed32"); } }
apache/servicecomb-java-chassis
1,111
foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/LambdaUtils.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.foundation.common.utils; import java.util.function.Consumer; public class LambdaUtils { public static <T> Consumer<T> ignoreException(Consumer<T> consumer) { return item -> { try { consumer.accept(item); } catch (Throwable e) { } }; } }
apache/servicecomb-pack
1,105
acceptance-tests/acceptance-pack-spring-demo-with-consul/src/test/java/org/apache/servicecomb/pack/RunCucumberIT.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.pack; import org.junit.runner.RunWith; import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) @CucumberOptions(plugin = {"pretty", "html:target/cucumber"}, features = "src/test/resources") public class RunCucumberIT { }
apache/servicecomb-pack
1,135
alpha/alpha-core/src/main/java/org/apache/servicecomb/pack/alpha/core/OmegaCallback.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.pack.alpha.core; import org.apache.servicecomb.pack.alpha.core.fsm.CompensateAckType; public interface OmegaCallback { void compensate(TxEvent event); default void disconnect() { } default void getAck(CompensateAckType type) { } default boolean isWaiting() { return false; } }
apache/servicecomb-toolkit
1,072
oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DiffValidatorFactoryTestConfiguration.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.toolkit.oasv.compatibility.factory; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; @Configuration @ComponentScan class DiffValidatorFactoryTestConfiguration { }
apache/servicecomb-toolkit
1,109
oas-validator/oas-validator-core/src/main/java/org/apache/servicecomb/toolkit/oasv/validation/api/PathsValidator.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.toolkit.oasv.validation.api; import io.swagger.v3.oas.models.Paths; /** * <a href="https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#pathsObject">Paths Object</a> validator */ public interface PathsValidator extends OasObjectValidator<Paths> { }
apache/servicecomb-toolkit
1,140
cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibilityAbbr.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.toolkit.cli; import io.airlift.airline.Command; @Command(name = "cc", description = "Check compatibility for two OpenAPI v3 spec yamls," + " right one should be semantically compatible with left one", hidden = true) public class CheckCompatibilityAbbr extends CheckCompatibilityBase { }
apache/shardingsphere
1,102
kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/execute/PipelineLifecycleRunnable.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.data.pipeline.core.execute; /** * Pipeline lifecycle runnable. */ public interface PipelineLifecycleRunnable extends Runnable { /** * Start run execute. */ void start(); /** * Stop running execute. */ void stop(); }
apache/shiro
1,154
support/jakarta-ee/src/main/java/org/apache/shiro/ee/cdi/ShiroFacesViewScoped.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.shiro.ee.cdi; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import javax.inject.Scope; /** * {@code @javax.faces.view.ViewScoped} interface that works with Shiro sessions * Primarily for plugging into Shiro destruction pipeline * <p> * This is an internal class and should not be used by applications */ @Scope @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD}) @interface ShiroFacesViewScoped { }
apache/skywalking-java
1,123
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/boot/DefaultImplementor.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.agent.core.boot; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface DefaultImplementor { }
apache/skywalking
1,113
oap-server/server-library/library-util/src/main/java/org/apache/skywalking/oap/server/library/util/prometheus/Parsers.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.library.util.prometheus; import java.io.InputStream; import org.apache.skywalking.oap.server.library.util.prometheus.parser.TextParser; public class Parsers { public static Parser text(final InputStream stream) { return new TextParser(stream); } }
apache/solr
1,152
solr/solrj/src/java/org/apache/solr/client/solrj/routing/NoOpReplicaListTransformer.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.solr.client.solrj.routing; import java.util.List; public final class NoOpReplicaListTransformer implements ReplicaListTransformer { public static final ReplicaListTransformer INSTANCE = new NoOpReplicaListTransformer(); private NoOpReplicaListTransformer() {} @Override public <T> void transform(List<T> choices) {} }
apache/stratos
1,083
components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/signup/CompleteApplicationSignUpsEventListener.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.stratos.messaging.listener.application.signup; import org.apache.stratos.messaging.listener.EventListener; /** * Complete application signups event listener. */ public abstract class CompleteApplicationSignUpsEventListener extends EventListener { }
apache/streampipes
1,126
streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/IPipelineElementTemplateStorage.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.storage.api; import org.apache.streampipes.model.template.PipelineElementTemplate; import java.util.List; public interface IPipelineElementTemplateStorage extends CRUDStorage<PipelineElementTemplate> { List<PipelineElementTemplate> getPipelineElementTemplatesforAppId(String appId); }
apache/syncope
1,143
core/spring/src/main/java/org/apache/syncope/core/spring/policy/AccountPolicyException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.syncope.core.spring.policy; public class AccountPolicyException extends PolicyException { private static final long serialVersionUID = 2779416455067691813L; public AccountPolicyException() { super(); } public AccountPolicyException(final String message) { super(message); } }
apache/systemds
1,144
src/main/java/org/apache/sysds/runtime/compress/workload/WTreeNode.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; /** * A Node in the WTree, this is used for any nodes that are not the root. */ public class WTreeNode extends AWTreeNode { private final int _reps; public WTreeNode(WTNodeType type, int reps) { super(type); _reps = reps; } public int getReps(){ return _reps; } }
apache/tajo
1,153
tajo-rpc/tajo-rpc-common/src/main/java/org/apache/tajo/rpc/RemoteException.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tajo.rpc; public class RemoteException extends RuntimeException { public RemoteException() { super(); } public RemoteException(String message) { super(message); } public RemoteException(Throwable t) { super(t); } public RemoteException(String message, Throwable t) { super(message, t); } }
apache/tapestry-5
1,138
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/meta/ContentTypeExtractor.java
// Copyright 2010 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.internal.services.meta; import org.apache.tapestry5.MetaDataConstants; import org.apache.tapestry5.annotations.ContentType; import org.apache.tapestry5.model.MutableComponentModel; import org.apache.tapestry5.services.meta.MetaDataExtractor; public class ContentTypeExtractor implements MetaDataExtractor<ContentType> { public void extractMetaData(MutableComponentModel model, ContentType annotation) { model.setMeta(MetaDataConstants.RESPONSE_CONTENT_TYPE, annotation.value()); } }
apache/tapestry-5
1,147
tapestry-cdi/src/test/java/org/apache/tapestry5/cdi/test/services/PojoModule.java
// Copyright 2013 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.cdi.test.services; import org.apache.tapestry5.cdi.CDIInjectModule; import org.apache.tapestry5.ioc.MappedConfiguration; import org.apache.tapestry5.ioc.annotations.SubModule; import org.apache.tapestry5.ioc.services.ClasspathURLConverter; @SubModule({ CDIInjectModule.class }) public final class PojoModule { public static void contributeServiceOverride(MappedConfiguration<Class,Object> configuration) { configuration.add(ClasspathURLConverter.class, new ClasspathURLConverterJBoss7Dot1()); } }
apache/tapestry-5
1,160
tapestry-jpa/src/test/java/org/example/app1/services/UserDAO.java
// Copyright 2011 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.example.app1.services; import java.util.List; import jakarta.persistence.PersistenceContext; import org.apache.tapestry5.jpa.annotations.CommitAfter; import org.example.app1.AppConstants; import org.example.app1.entities.User; public interface UserDAO { @CommitAfter @PersistenceContext(unitName = AppConstants.TEST_PERSISTENCE_UNIT) void add(User user); List<User> findAll(); @CommitAfter @PersistenceContext(unitName = AppConstants.TEST_PERSISTENCE_UNIT) void delete(User... users); void deleteAll(); }
apache/tomee
1,089
arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessHome.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.cmp.sample; import java.rmi.RemoteException; import jakarta.ejb.CreateException; import jakarta.ejb.EJBHome; public interface MoviesBusinessHome extends EJBHome { MoviesBusiness create() throws RemoteException, CreateException; }
apache/tomee
1,158
container/openejb-api/src/main/java/org/apache/openejb/api/resource/Template.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.api.resource; /** * Called to setup a service/resource. * * It is called at the very beginning of resource configuration (ie before provider are resolved) * so the resource can be fully configured. * * @param <T> Service or AbstractService or Resource. */ public interface Template<T> { void configure(T resource); }
apache/tomee
1,158
container/openejb-core/src/main/java/org/apache/openejb/testing/Descriptor.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.testing; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface Descriptor { String name(); String path(); }
apache/tomee
1,165
container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb3/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. */ @jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter(value = jakarta.xml.bind.annotation.adapters.CollapsedStringAdapter.class, type = String.class) @jakarta.xml.bind.annotation.XmlSchema(namespace = "http://www.openejb.org/openejb-jar/1.1", elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED) package org.apache.openejb.jee.oejb3;
apache/trafodion
1,168
core/rest/src/main/java/org/trafodion/rest/ResourceConfig.java
/* * @@@ START COPYRIGHT @@@ * * 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. * * @@@ END COPYRIGHT @@@ */ package org.trafodion.rest; import com.sun.jersey.api.core.PackagesResourceConfig; public class ResourceConfig extends PackagesResourceConfig { public ResourceConfig() { super("org.trafodion.rest"); } }
apache/tsfile
1,150
java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/FloatRLBEDecoder.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.encoding.decoder; import java.nio.ByteBuffer; public class FloatRLBEDecoder extends IntRLBEDecoder { /** constructor of FloatRLBEDecoder */ public FloatRLBEDecoder() { super(); } @Override public float readFloat(ByteBuffer buffer) { return Float.intBitsToFloat(super.readInt(buffer)); } }
apache/unomi
1,147
graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CDPGraphQLConstants.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.unomi.graphql; public interface CDPGraphQLConstants { String SEGMENT_ARGUMENT_NAME = "segment"; String PERSONA_ARGUMENT_NAME = "persona"; String EVENT_PROCESSOR_CLASS = "eventProcessorClass"; String CDP_LIST_UPDATE_EVENT_NAME = "cdp_listsUpdateEvent"; String DEFAULT_RANGE_NAME = "defaultRange"; }
apache/unomi
1,166
api/src/main/java/org/apache/unomi/api/actions/ActionPostExecutor.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.unomi.api.actions; import org.apache.unomi.api.rules.Rule; /** * An action to be executed after all {@link Rule}-derived have been processed. */ public interface ActionPostExecutor { /** * Performs the action. * * @return {@code true} if the operation succeeded, {@code false} otherwise */ boolean execute(); }
apache/usergrid
1,134
stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/api/URIStrategy.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.usergrid.persistence.qakka.api; import java.net.URI; import java.net.URISyntaxException; import java.util.UUID; public interface URIStrategy { URI queueURI(String queueName) throws URISyntaxException; URI queueMessageDataURI(String queueName, UUID queueMessageId) throws URISyntaxException; }
apache/usergrid
1,134
stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/LegacyQueue.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. 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. For additional information regarding * copyright in this work, please see the NOTICE file in the top level * directory of this distribution. */ package org.apache.usergrid.persistence.queue; public class LegacyQueue { private final String url; public LegacyQueue(String url) { this.url = url; } public String getUrl(){ return url; } public boolean isEmpty(){ return url == null; } }
google/codeu_project_2017
1,171
src/codeu/chat/common/RandomUuidGenerator.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 codeu.chat.common; import java.util.Random; import codeu.chat.util.Uuid; // Create a new random uuid. Uuids from this generator are random // but are not guaranteed to be unique. Checking uniqueness is left // to the caller. public final class RandomUuidGenerator implements Uuid.Generator { private final Uuid commonRoot; private final Random random; public RandomUuidGenerator(Uuid root, long seed) { this.commonRoot = root; this.random = new Random(seed); } @Override public Uuid make() { return new Uuid(commonRoot, random.nextInt()); } }
google/copybara
1,169
java/com/google/copybara/git/gerritapi/RestoreInput.java
/* * Copyright (C) 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.copybara.git.gerritapi; import com.google.api.client.util.Key; import javax.annotation.Nullable; /** * See https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#restore-input */ public class RestoreInput { @Key String message; private RestoreInput(@Nullable String message) { this.message = message; } public static RestoreInput create(@Nullable String message) { return new RestoreInput(message); } public static RestoreInput createWithoutComment() { return new RestoreInput(/*message=*/null); } }
google/copybara
1,183
java/com/google/copybara/git/EventTrigger.java
/* * Copyright (C) 2021 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.copybara.git; import com.google.auto.value.AutoValue; import com.google.common.collect.ImmutableSet; import com.google.copybara.git.github.api.GitHubEventType; /** * A simple pair to express GitHub Events with arbitrary subtypes (Status, CheckRun) */ @AutoValue public abstract class EventTrigger { public abstract GitHubEventType type(); public abstract ImmutableSet<String> subtypes(); public static EventTrigger create(GitHubEventType type, Iterable<String> subtypes) { return new AutoValue_EventTrigger(type, ImmutableSet.copyOf(subtypes)); } }
google/j2cl
1,159
tools/javatests/com/google/j2cl/tools/rta/typeliteral/Main.java
/* * Copyright 2020 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 * * 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.j2cl.tools.rta.typeliteral; import jsinterop.annotations.JsMethod; class Main { static class Foo { void instanceMethod() {} } static class Bar { void instanceMethod() {} } static class Baz { void instanceMethod() {} } @JsMethod public static void main() { Foo foo = null; foo.instanceMethod(); Class<?> clazz = Foo.class; Bar bar = null; bar.instanceMethod(); if (((Object) foo) instanceof Bar) {} Baz baz = null; baz.instanceMethod(); Object o = (Baz) (Object) foo; } }
google/j2objc
1,122
jre_emul/android/platform/libcore/luni/src/test/java/libcore/java/util/zip/OldDataFormatExceptionTest.java
/* * Copyright (C) 2008 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 libcore.java.util.zip; import junit.framework.TestCase; import java.util.zip.DataFormatException; public class OldDataFormatExceptionTest extends TestCase { public void testDataFormatException() { DataFormatException dfe = new DataFormatException(); assertEquals(dfe.getMessage(), null); } public void testDataFormatExceptionString() { DataFormatException dfe = new DataFormatException("Test"); assertEquals(dfe.getMessage(), "Test"); } }
google/j2objc
1,143
translator/src/main/java/com/google/devtools/j2objc/ast/BlockComment.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 com.google.devtools.j2objc.ast; /** * Block comments begin with "/*" and end with "*&#47;". */ public class BlockComment extends Comment { public BlockComment() {} public BlockComment(BlockComment other) { super(other); } @Override public Kind getKind() { return Kind.BLOCK_COMMENT; } public boolean isBlockComment() { return true; } @Override protected void acceptInner(TreeVisitor visitor) { visitor.visit(this); visitor.endVisit(this); } @Override public BlockComment copy() { return new BlockComment(this); } }
google/MOE
1,153
client/src/test/java/com/google/devtools/moe/client/testing/TestingUtils.java
package com.google.devtools.moe.client.testing; import com.google.devtools.moe.client.CommandRunner; import com.google.devtools.moe.client.FileSystem; import com.google.devtools.moe.client.Ui; import com.google.devtools.moe.client.codebase.ExpressionEngine; import com.google.devtools.moe.client.codebase.ExpressionModule; import dagger.BindsInstance; import dagger.Component; import javax.inject.Singleton; /** Some conveniences for testing. */ public class TestingUtils { @Singleton @Component(modules = ExpressionModule.class) interface TestComponent { ExpressionEngine engine(); static Builder builder() { return DaggerTestingUtils_TestComponent.builder(); } @Component.Builder interface Builder { @BindsInstance Builder ui(Ui ui); @BindsInstance Builder fs(FileSystem fs); @BindsInstance Builder cmd(CommandRunner cmd); TestComponent build(); } } public static ExpressionEngine expressionEngineWithRepo(Ui ui, FileSystem fs, CommandRunner cmd) { return TestComponent.builder().ui(ui).fs(fs).cmd(cmd).build().engine(); } private TestingUtils() {} }
google/sagetv
1,162
test/java/sage/epg/sd/json/locale/SDLanguageDeserializerTest.java
/* * Copyright 2015 The SageTV Authors. All Rights Reserved. * * 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 sage.epg.sd.json.locale; import org.testng.annotations.Test; import sage.epg.sd.DeserializeTest; import java.io.IOException; public class SDLanguageDeserializerTest extends DeserializeTest { @Test(groups = {"gson", "schedulesDirect", "language" }) public void deserialize() throws IOException { // Source: https://json.schedulesdirect.org/20141201/available/languages String languageJson = "epg/sd/json/locale/languageDigraphs.json"; SDLanguage languages[] = deserialize(languageJson, SDLanguage[].class); } }
googleads/googleads-mobile-unity
1,071
source/plugin/Assets/Plugins/Android/GoogleMobileAdsPlugin.androidlib/src/main/java/com/google/unity/ads/UnityRewardedInterstitialAdCallback.java
/* * Copyright (C) 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.unity.ads; import com.google.android.gms.ads.LoadAdError; /** * Rewarded interstitial ad events that can be implemented via {@code AndroidJavaProxy} in Unity. */ public interface UnityRewardedInterstitialAdCallback extends UnityPaidEventListener, UnityFullScreenContentCallback { void onRewardedInterstitialAdLoaded(); void onRewardedInterstitialAdFailedToLoad(LoadAdError error); void onUserEarnedReward(String type, float amount); }
googleapis/discovery-artifact-manager
1,136
toolkit/src/main/java/com/google/api/codegen/config/ResourceNameConfig.java
/* Copyright 2016 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.api.codegen.config; import com.google.api.tools.framework.model.ProtoFile; public interface ResourceNameConfig { /** Returns the name used as a basis for generating methods. */ String getEntityName(); /** Returns the resource name type. */ ResourceNameType getResourceNameType(); /** * Returns the proto file to which the resource name config has been assigned. This is required to * ensure that a consistent namespace can be calculated for the resource name. */ ProtoFile getAssignedProtoFile(); }
googleapis/google-cloud-java
1,054
java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseFailoverResponseOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/orchestration/airflow/service/v1/environments.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.orchestration.airflow.service.v1; public interface DatabaseFailoverResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse) com.google.protobuf.MessageOrBuilder {}
hibernate/hibernate-ogm
1,109
mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/type/impl/StringAsObjectIdGridType.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.datastore.mongodb.type.impl; import org.bson.types.ObjectId; import org.hibernate.MappingException; import org.hibernate.engine.spi.Mapping; import org.hibernate.ogm.type.descriptor.impl.WrappedGridTypeDescriptor; import org.hibernate.ogm.type.impl.AbstractGenericBasicType; /** * Persists Strings as {@link ObjectId}s in MongoDB: * * @author Gunnar Morling * */ public class StringAsObjectIdGridType extends AbstractGenericBasicType<String> { public static final StringAsObjectIdGridType INSTANCE = new StringAsObjectIdGridType(); public StringAsObjectIdGridType() { super( WrappedGridTypeDescriptor.INSTANCE, StringAsObjectIdTypeDescriptor.INSTANCE ); } @Override public String getName() { return "string_objectid"; } @Override public int getColumnSpan(Mapping mapping) throws MappingException { return 1; } }
hibernate/hibernate-orm
1,070
hibernate-core/src/main/java/org/hibernate/engine/internal/BeforeTransactionCompletionProcessQueue.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.engine.internal; import org.hibernate.HibernateException; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.engine.spi.TransactionCompletionCallbacks.BeforeCompletionCallback; /** * Encapsulates behavior needed for before transaction processing */ public class BeforeTransactionCompletionProcessQueue extends AbstractTransactionCompletionProcessQueue<BeforeCompletionCallback> { public BeforeTransactionCompletionProcessQueue(SharedSessionContractImplementor session) { super( session ); } public void beforeTransactionCompletion() { BeforeCompletionCallback process; while ( (process = processes.poll()) != null ) { try { process.doBeforeTransactionCompletion( session ); } catch (HibernateException he) { throw he; } catch (Exception e) { throw new HibernateException( "Unable to perform beforeTransactionCompletion callback: " + e.getMessage(), e ); } } } }
hibernate/hibernate-orm
1,084
hibernate-core/src/test/java/org/hibernate/orm/test/annotations/cascade/circle/identity/F.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.annotations.cascade.circle.identity; /** * No Documentation */ @jakarta.persistence.Entity public class F extends AbstractEntity { private static final long serialVersionUID = 1471534025L; /** * No documentation */ @jakarta.persistence.OneToMany(cascade = { jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} , mappedBy = "f") private java.util.Set<B> bCollection = new java.util.HashSet<B>(); /** * No documentation */ @jakarta.persistence.OneToOne(cascade = { jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} ) private H h; public java.util.Set<B> getBCollection() { return bCollection; } public void setBCollection( java.util.Set<B> parameter) { this.bCollection = parameter; } public H getH() { return h; } public void setH(H parameter) { this.h = parameter; } }
hibernate/hibernate-orm
1,084
hibernate-core/src/test/java/org/hibernate/orm/test/annotations/cascade/circle/sequence/F.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.annotations.cascade.circle.sequence; /** * No Documentation */ @jakarta.persistence.Entity public class F extends AbstractEntity { private static final long serialVersionUID = 1471534025L; /** * No documentation */ @jakarta.persistence.OneToMany(cascade = { jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} , mappedBy = "f") private java.util.Set<B> bCollection = new java.util.HashSet<B>(); /** * No documentation */ @jakarta.persistence.OneToOne(cascade = { jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} ) private H h; public java.util.Set<B> getBCollection() { return bCollection; } public void setBCollection( java.util.Set<B> parameter) { this.bCollection = parameter; } public H getH() { return h; } public void setH(H parameter) { this.h = parameter; } }
hibernate/hibernate-orm
1,086
hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integrator/BasicIntegratorTest.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.envers.integrator; import jakarta.persistence.Entity; import jakarta.persistence.Id; import org.hibernate.cfg.Configuration; import org.hibernate.testing.orm.junit.JiraKey; import org.hibernate.testing.util.ServiceRegistryUtil; import org.junit.Test; /** * @author Steve Ebersole */ public class BasicIntegratorTest { /** * Tests that nothing crazy happens if the hibernate-envers jar happens * to be on the classpath but we have no audited entities */ @Test @JiraKey( value = "HHH-9675" ) public void testNoAudited() { new Configuration().buildSessionFactory( ServiceRegistryUtil.serviceRegistry()).close(); new Configuration().addAnnotatedClass( SimpleNonAuditedEntity.class ).buildSessionFactory(ServiceRegistryUtil.serviceRegistry()).close(); } @Entity public static class SimpleNonAuditedEntity { private Integer id; @Id public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } } }
hibernate/hibernate-orm
1,091
hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/EmbeddableJpaAnnotation.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.models.spi.ModelsContext; import jakarta.persistence.Embeddable; @SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" }) @jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor") public class EmbeddableJpaAnnotation implements Embeddable { /** * Used in creating dynamic annotation instances (e.g. from XML) */ public EmbeddableJpaAnnotation(ModelsContext modelContext) { } /** * Used in creating annotation instances from JDK variant */ public EmbeddableJpaAnnotation(Embeddable annotation, ModelsContext modelContext) { } /** * Used in creating annotation instances from Jandex variant */ public EmbeddableJpaAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) { } @Override public Class<? extends Annotation> annotationType() { return Embeddable.class; } }
hibernate/hibernate-orm
1,091
hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/PostUpdateJpaAnnotation.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.models.spi.ModelsContext; import jakarta.persistence.PostUpdate; @SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" }) @jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor") public class PostUpdateJpaAnnotation implements PostUpdate { /** * Used in creating dynamic annotation instances (e.g. from XML) */ public PostUpdateJpaAnnotation(ModelsContext modelContext) { } /** * Used in creating annotation instances from JDK variant */ public PostUpdateJpaAnnotation(PostUpdate annotation, ModelsContext modelContext) { } /** * Used in creating annotation instances from Jandex variant */ public PostUpdateJpaAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) { } @Override public Class<? extends Annotation> annotationType() { return PostUpdate.class; } }
hibernate/hibernate-orm
1,091
hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/PrePersistJpaAnnotation.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.models.spi.ModelsContext; import jakarta.persistence.PrePersist; @SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" }) @jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor") public class PrePersistJpaAnnotation implements PrePersist { /** * Used in creating dynamic annotation instances (e.g. from XML) */ public PrePersistJpaAnnotation(ModelsContext modelContext) { } /** * Used in creating annotation instances from JDK variant */ public PrePersistJpaAnnotation(PrePersist annotation, ModelsContext modelContext) { } /** * Used in creating annotation instances from Jandex variant */ public PrePersistJpaAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) { } @Override public Class<? extends Annotation> annotationType() { return PrePersist.class; } }
hibernate/hibernate-orm
1,098
hibernate-core/src/test/java/org/hibernate/orm/test/legacy/OuterKey.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.legacy; import java.io.Serializable; /** * @author Stefano Travelli */ public class OuterKey implements Serializable { private Middle root; private String detailId; public Middle getRoot() { return root; } public void setRoot(Middle root) { this.root = root; } public String getDetailId() { return detailId; } public void setDetailId(String detailId) { this.detailId = detailId; } public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof OuterKey)) return false; final OuterKey cidDetailID = (OuterKey) o; if (detailId != null ? !detailId.equals(cidDetailID.detailId) : cidDetailID.detailId != null) return false; if ( root != null ? !root.equals(cidDetailID.root ) : cidDetailID.root != null) return false; return true; } public int hashCode() { int result; result = ( root != null ? root.hashCode() : 0); result = 29 * result + (detailId != null ? detailId.hashCode() : 0); return result; } }
hibernate/hibernate-search
1,043
documentation/src/test/java/org/hibernate/search/documentation/mapper/orm/gettingstarted/withhsearch/customanalysis/Author.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.documentation.mapper.orm.gettingstarted.withhsearch.customanalysis; // tag::include[] import java.util.HashSet; import java.util.Set; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.ManyToMany; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextField; @Entity public class Author { @Id @GeneratedValue private Integer id; @FullTextField(analyzer = "name") // <1> private String name; @ManyToMany(mappedBy = "authors") private Set<Book> books = new HashSet<>(); public Author() { } // Getters and setters // ... // tag::getters-setters[] public Integer getId() { return id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Set<Book> getBooks() { return books; } // end::getters-setters[] } // end::include[]
hibernate/hibernate-search
1,097
v5migrationhelper/engine/src/main/java/org/hibernate/search/spatial/Coordinates.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.spatial; import org.hibernate.search.annotations.Latitude; import org.hibernate.search.annotations.Longitude; import org.hibernate.search.engine.spatial.GeoPoint; /** * Minimum interface for a field/method to be spatial hash indexable * * @author Nicolas Helleringer * @deprecated Use {@link GeoPoint} instead. * Refer to the <a href="https://hibernate.org/search/documentation/migrate/6.0/">migration guide</a> for more information. */ @Deprecated public interface Coordinates { /** * @return the latitude in degrees */ @Latitude Double getLatitude(); /** * @return the longitude in degrees */ @Longitude Double getLongitude(); static GeoPoint toGeoPoint(Coordinates coordinates) { if ( coordinates == null ) { return null; } Double latitude = coordinates.getLatitude(); Double longitude = coordinates.getLongitude(); if ( latitude == null || longitude == null ) { return null; } return GeoPoint.of( latitude, longitude ); } }
hibernate/hibernate-test-case-templates
1,087
validator/validator-8/src/test/java/org/hibernate/validator/bugs/YourTestCase.java
package org.hibernate.validator.bugs; import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.Set; import org.hibernate.validator.testutil.TestForIssue; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import jakarta.validation.ConstraintViolation; import jakarta.validation.Validation; import jakarta.validation.Validator; import jakarta.validation.ValidatorFactory; class YourTestCase { private static Validator validator; @BeforeAll public static void setUp() { ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); validator = factory.getValidator(); } @Test @TestForIssue(jiraKey = "HV-NNNNN") // Please fill in the JIRA key of your issue void testYourBug() { YourAnnotatedBean yourEntity1 = new YourAnnotatedBean( null, "example" ); Set<ConstraintViolation<YourAnnotatedBean>> constraintViolations = validator.validate( yourEntity1 ); assertEquals( 1, constraintViolations.size() ); assertEquals( "must not be null", constraintViolations.iterator().next().getMessage() ); } }
hibernate/hibernate-tools
1,116
test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/City.java
/* * Hibernate Tools, Tooling for your Hibernate Projects * * Copyright 2004-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.ide.completion.ModelCompletion; /** * @author Dmitry Geraskov * */ public abstract class City { private Long id; private String name; public City() { } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
openjdk/jdk8
1,182
langtools/test/tools/javac/diags/examples/ErrorReadingFile.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.error.reading.file // run: jsr199 -filemanager cantRead:.*/ErrorReadingFile.java class ErrorReadingFile { }
openjdk/jdk8
1,191
langtools/test/tools/javac/lambda/separate/Foo.java
/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ interface Foo<X extends Number> { void m(X x); } class FooLib { void m1(Foo<?> uf) { } void m2(Foo<? extends Object> uf) { } }
openjdk/jtreg
1,182
test/modlibs/buildAction/usermods/um3/um3_p1/um3_p1_B.java
/* * Copyright (c) 2015, 2017, 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 um3_p1; public class um3_p1_B { public void run() { System.out.println(getClass().getName()); } }
openjdk/jtreg
1,204
test/share/basic/driver/CantFindSrc.java
/* * Copyright (c) 1999, 2014, 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 * @summary Error: Can't find source file: CannotFindSrc.java in directory-list: .../data/basic/driver * @run driver CannotFindSrc */
oracle/coherence
1,149
prj/test/functional/cache/src/main/java/override/TestNamespaceHandler.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 override; import com.tangosol.config.ConfigurationException; import com.tangosol.config.xml.AbstractNamespaceHandler; import com.tangosol.config.xml.ElementProcessor; import com.tangosol.config.xml.ProcessingContext; import com.tangosol.config.xml.XmlSimpleName; import com.tangosol.run.xml.XmlElement; /** * Class to handler custom test namespace handling. * */ public class TestNamespaceHandler extends AbstractNamespaceHandler { /** * Constructs a {@link TestNamespaceHandler}. */ public TestNamespaceHandler() { registerProcessor(TestElementProcessor.class); } @XmlSimpleName("test") public static class TestElementProcessor<T> implements ElementProcessor<T> { @Override public T process(ProcessingContext context, XmlElement xmlElement) throws ConfigurationException { return null; } } }
apache/commons-pool
1,147
src/test/java/org/apache/commons/pool3/proxy/TestProxiedKeyedObjectPoolWithJdkProxy.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.pool3.proxy; class TestProxiedKeyedObjectPoolWithJdkProxy extends AbstractTestProxiedKeyedObjectPool { @Override protected ProxySource<TestObject> getProxySource() { return new JdkProxySource<>(this.getClass().getClassLoader(), new Class<?>[] { TestObject.class }); } }
apache/cxf
1,117
rt/rs/security/http-signature/src/main/java/org/apache/cxf/rs/security/httpsignature/exception/DifferentDigestsException.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.httpsignature.exception; public class DifferentDigestsException extends SignatureException { private static final long serialVersionUID = 1L; public DifferentDigestsException() { } public DifferentDigestsException(String message) { super(message); } }
apache/cxf
1,136
rt/rs/security/http-signature/src/main/java/org/apache/cxf/rs/security/httpsignature/SignatureCreator.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.httpsignature; import java.io.IOException; import java.util.List; import java.util.Map; public interface SignatureCreator { String createSignature(Map<String, List<String>> messageHeaders, String uri, String method) throws IOException; }
apache/cxf
1,137
rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/authorization/SecurityContextProvider.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.saml.authorization; import org.apache.cxf.message.Message; import org.apache.cxf.security.SecurityContext; import org.apache.wss4j.common.saml.SamlAssertionWrapper; public interface SecurityContextProvider { SecurityContext getSecurityContext(Message message, SamlAssertionWrapper wrapper); }
apache/cxf
1,137
systests/transport-hc5/src/test/java/org/apache/cxf/systest/hc5/http/timeout/DelayedServiceImpl.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.hc5.http.timeout; public class DelayedServiceImpl implements DelayedService { public String delay(long delay) { try { Thread.sleep(delay); } catch (InterruptedException ex) { /* do nothing */ } return "Replied after " + delay + "ms"; } }
apache/cxf
1,150
rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/GenericEntityImpl.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.jaxrs.fortest; import jakarta.ws.rs.Path; import org.apache.cxf.jaxrs.resources.Book; @Path("/books") public class GenericEntityImpl implements GenericEntity<Book> { private Book book; public void postEntity(Book object) { book = object; } public Book getEntity() { return book; } }
apache/cxf
1,156
rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/XFireBean3.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.aegis.type.java5; public class XFireBean3 { private String attributeProperty; @XmlAttribute(name = "attribute") public String getAttributeProperty() { return attributeProperty; } public void setAttributeProperty(String attributeProperty) { this.attributeProperty = attributeProperty; } }
apache/deltaspike
1,110
deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/util/jpa/Hibernate6QueryStringExtractor.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.deltaspike.data.impl.util.jpa; @ProviderSpecific("org.hibernate.query.Query") public class Hibernate6QueryStringExtractor extends BaseQueryStringExtractor { @Override public String extractFrom(Object query) { return (String) invoke("getQueryString", query); } }
apache/directory-kerby
1,138
kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1PrintableString.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.kerby.asn1.type; import org.apache.kerby.asn1.UniversalTag; public class Asn1PrintableString extends Asn1String { public Asn1PrintableString() { this(null); } public Asn1PrintableString(String value) { super(UniversalTag.PRINTABLE_STRING, value); } }
apache/directory-kerby
1,138
kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/type/Asn1UniversalString.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.kerby.asn1.type; import org.apache.kerby.asn1.UniversalTag; public class Asn1UniversalString extends Asn1String { public Asn1UniversalString() { this(null); } public Asn1UniversalString(String value) { super(UniversalTag.UNIVERSAL_STRING, value); } }
apache/dolphinscheduler
1,098
dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/service/EventFetcher.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.alert.service; import java.util.List; /** * The interface responsible for fetching events. * * @param <T> the type of event */ public interface EventFetcher<T> { void start(); List<T> fetchPendingEvent(int eventOffset); void shutdown(); }
apache/drill
1,158
exec/rpc/src/main/java/org/apache/drill/exec/rpc/NonTransientRpcException.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; public class NonTransientRpcException extends RpcException { public NonTransientRpcException(String message) { super(message); } public NonTransientRpcException(String format, Object... args) { super(String.format(format, args)); } public NonTransientRpcException(Throwable t) { super(t); } }