repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/iotdb | 1,137 | iotdb-api/udf-api/src/main/java/org/apache/iotdb/udf/api/customizer/config/UDAFConfigurations.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.iotdb.udf.api.customizer.config;
import org.apache.iotdb.udf.api.type.Type;
public class UDAFConfigurations extends UDFConfigurations {
public UDAFConfigurations() {}
public UDAFConfigurations setOutputDataType(Type outputDataType) {
this.outputDataType = outputDataType;
return this;
}
}
|
apache/jackrabbit-oak | 1,123 | oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/user/UserIdCredentialsTest.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.jackrabbit.oak.spi.security.user;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class UserIdCredentialsTest {
@Test
public void testGetId() {
UserIdCredentials creds = new UserIdCredentials("id");
assertEquals("id", creds.getUserId());
}
} |
apache/jackrabbit-oak | 1,125 | oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/CompositeException.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.jackrabbit.oak.index.indexer.document;
import org.slf4j.Logger;
public class CompositeException extends Exception {
public void logAllExceptions(String message, Logger log) {
for (Throwable throwable : getSuppressed()) {
log.error(message, throwable);
}
}
}
|
apache/jackrabbit-oak | 1,134 | oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/benchmark/ConcurrentReadDeepTreeTest.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.jackrabbit.oak.benchmark;
/**
* Concurrently reads random items from the deep tree.
*/
public class ConcurrentReadDeepTreeTest extends ReadDeepTreeTest {
public ConcurrentReadDeepTreeTest(boolean runAsAdmin, int itemsToRead, boolean doReport) {
super(runAsAdmin, itemsToRead, doReport);
}
}
|
apache/jclouds | 1,152 | blobstore/src/main/java/org/jclouds/blobstore/strategy/DeleteDirectoryStrategy.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.jclouds.blobstore.strategy;
import org.jclouds.blobstore.strategy.internal.MarkersDeleteDirectoryStrategy;
import com.google.inject.ImplementedBy;
/**
* Deletes a directory.
*/
@ImplementedBy(MarkersDeleteDirectoryStrategy.class)
public interface DeleteDirectoryStrategy {
void execute(String containerName, String directory);
}
|
apache/jclouds | 1,154 | providers/aws-sts/src/test/java/org/jclouds/aws/sts/AWSSTSApiLiveTest.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.jclouds.aws.sts;
import org.jclouds.sts.STSApiLiveTest;
import org.testng.annotations.Test;
/**
* Tests behavior of {@code STSApi}
*/
@Test(groups = "live", singleThreaded = true, testName = "AWSSTSApiLiveTest")
public class AWSSTSApiLiveTest extends STSApiLiveTest {
public AWSSTSApiLiveTest() {
provider = "aws-sts";
}
}
|
apache/jena | 1,120 | jena-extras/jena-serviceenhancer/src/main/java/org/apache/jena/sparql/service/enhancer/impl/CacheProviderRegistry.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.jena.sparql.service.enhancer.impl;
import org.apache.jena.sparql.SystemARQ;
import org.apache.jena.sparql.util.Symbol;
// TODO Allow custom cache providers via a registry
public class CacheProviderRegistry {
public static Symbol cacheProvider = SystemARQ.allocSymbol("cacheProvider");
}
|
apache/jena | 1,160 | jena-arq/src/main/java/org/apache/jena/sparql/function/library/Math_exp.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.jena.sparql.function.library;
import org.apache.jena.sparql.expr.NodeValue;
import org.apache.jena.sparql.function.FunctionBase1;
// Returns the value of e^x.
public class Math_exp extends FunctionBase1 {
@Override
public NodeValue exec(NodeValue v) {
return NodeValue.makeDouble(Math.exp(v.getDouble()));
}
}
|
apache/jena | 1,174 | jena-arq/src/main/java/org/apache/jena/rdfs/engine/MapperX.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.jena.rdfs.engine;
import org.apache.jena.graph.Node;
/** Bridge between Node and X; 3-tuples and Triple/Quad */
public interface MapperX<X,T> {
public abstract X fromNode(Node n);
public abstract Node toNode(X x);
public abstract X subject(T tuple);
public abstract X predicate(T tuple);
public abstract X object(T tuple);
}
|
apache/jena | 1,176 | jena-base/src/main/java/org/apache/jena/atlas/AtlasException.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.jena.atlas;
public class AtlasException extends RuntimeException
{
public AtlasException() { super() ; }
public AtlasException(String msg) { super(msg) ; }
public AtlasException(Throwable th) { super(th) ; }
public AtlasException(String msg, Throwable th) { super(msg, th) ; }
}
|
apache/johnzon | 1,149 | johnzon-websocket/src/main/java/org/apache/johnzon/websocket/jsr/JsrArrayDecoder.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.johnzon.websocket.jsr;
import org.apache.johnzon.websocket.internal.jsr.JsrDecoder;
import jakarta.json.JsonArray;
import jakarta.json.JsonReader;
public class JsrArrayDecoder extends JsrDecoder<JsonArray> {
@Override
protected JsonArray doRead(JsonReader jsonReader) {
return jsonReader.readArray();
}
}
|
apache/joshua | 1,169 | src/test/java/org/apache/joshua/corpus/SpanTest.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.joshua.corpus;
import org.testng.Assert;
import org.testng.annotations.Test;
/**
*
*
* @author Lane Schwartz
*/
public class SpanTest {
@Test
public void iterator() {
Span span = new Span(1,10);
int expected = 1;
for (int actual : span) {
Assert.assertEquals(actual, expected);
expected++;
}
}
}
|
apache/kafka | 1,145 | clients/src/main/java/org/apache/kafka/common/errors/EligibleLeadersNotAvailableException.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.kafka.common.errors;
public class EligibleLeadersNotAvailableException extends InvalidMetadataException {
public EligibleLeadersNotAvailableException(String message) {
super(message);
}
public EligibleLeadersNotAvailableException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/kafka | 1,145 | clients/src/main/java/org/apache/kafka/common/errors/PreferredLeaderNotAvailableException.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.kafka.common.errors;
public class PreferredLeaderNotAvailableException extends InvalidMetadataException {
public PreferredLeaderNotAvailableException(String message) {
super(message);
}
public PreferredLeaderNotAvailableException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/kafka | 1,154 | clients/src/main/java/org/apache/kafka/common/errors/MemberIdRequiredException.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.kafka.common.errors;
public class MemberIdRequiredException extends ApiException {
private static final long serialVersionUID = 1L;
public MemberIdRequiredException(String message) {
super(message);
}
public MemberIdRequiredException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/kafka | 1,173 | streams/src/test/java/org/apache/kafka/test/MockValueJoiner.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.kafka.test;
import org.apache.kafka.streams.kstream.ValueJoiner;
public class MockValueJoiner {
public static final ValueJoiner<Object, Object, String> TOSTRING_JOINER = instance("+");
public static <V1, V2> ValueJoiner<V1, V2, String> instance(final String separator) {
return (value1, value2) -> value1 + separator + value2;
}
}
|
apache/karaf | 1,106 | examples/karaf-command-example/karaf-command-example-api/src/main/java/org/apache/karaf/examples/command/api/BookingService.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.karaf.examples.command.api;
import java.util.Collection;
/**
* Simple interface describing the booking service.
*/
public interface BookingService {
Collection<Booking> list();
Booking get(Long id);
void add(Booking booking);
void remove(Long id);
}
|
apache/kylin | 1,133 | src/core-metrics/src/main/java/org/apache/kylin/common/metrics/MetricsObjectType.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.common.metrics;
public enum MetricsObjectType {
MAX("max"),
MIN("min"),
COUNT("count"),
FIRST("first"),
LAST("last");
private String type;
MetricsObjectType(String type) {
this.type = type;
}
public String getVal() {
return this.type;
}
}
|
apache/kylin | 1,159 | src/core-common/src/main/java/org/apache/kylin/common/constant/Constant.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.common.constant;
public class Constant {
private Constant() {
// Just implement
}
public static final long SECOND = 1000L;
public static final long MINUTE = 60 * SECOND;
public static final int AUDIT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
public static final int MODEL_ALIAS_LEN_LIMIT = 127;
}
|
apache/manifoldcf | 1,149 | connectors/documentum/build-stub/src/main/java/com/documentum/com/IDfClientX.java | /* $Id$ */
/**
* 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 com.documentum.com;
import com.documentum.fc.client.IDfClient;
import com.documentum.fc.common.IDfLoginInfo;
import com.documentum.fc.common.DfException;
/** Stub interface to allow the connector to build fully.
*/
public interface IDfClientX
{
public IDfLoginInfo getLoginInfo();
public IDfClient getLocalClient()
throws DfException;
}
|
apache/maven-plugins | 1,118 | maven-project-info-reports-plugin/src/test/java/org/apache/maven/report/projectinfo/stubs/TeamStub.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 <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @version $Id$
*/
public class TeamStub
extends ProjectInfoProjectStub
{
@Override
protected String getPOM()
{
return "team-plugin-config.xml";
}
}
|
apache/maven-shade-plugin | 1,150 | src/main/java/org/apache/maven/plugins/shade/mojo/ArtifactSet.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.maven.plugins.shade.mojo;
import java.util.Set;
/**
* @author Jason van Zyl
*/
public class ArtifactSet {
private Set<String> includes;
private Set<String> excludes;
public Set<String> getIncludes() {
return includes;
}
public Set<String> getExcludes() {
return excludes;
}
}
|
apache/maven-surefire | 1,140 | surefire-api/src/main/java/org/apache/maven/surefire/api/report/ReporterException.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.maven.surefire.api.report;
/**
* Exception occurring during report generation.
*
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
*/
public class ReporterException extends RuntimeException {
public ReporterException(String message, Exception nested) {
super(message, nested);
}
}
|
apache/mina-ftpserver | 1,146 | core/src/test/java/org/apache/ftpserver/ssl/MinaImplicitSSLTest.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.ftpserver.ssl;
import org.junit.Ignore;
/**
*
* @author <a href="http://mina.apache.org">Apache MINA Project</a>
*
*/
@Ignore( "SSL V3 not supported anymore" )
public class MinaImplicitSSLTest extends ImplicitSecurityTestTemplate {
@Override
protected String getAuthValue() {
return "SSL";
}
}
|
apache/mina-ftpserver | 1,148 | core/src/test/java/org/apache/ftpserver/ssl/MinaExplicitTLSTest.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.ftpserver.ssl;
import org.junit.Ignore;
/**
*
* @author <a href="http://mina.apache.org">Apache MINA Project</a>
*
*/
@Ignore( "SSL V3 not supported anymore" )
public class MinaExplicitTLSTest extends ExplicitSecurityTestTemplate {
@Override
protected String getAuthValue() {
return "TLSv1.2";
}
}
|
apache/mina | 1,171 | core/src/main/java/org/apache/mina/filter/query/Response.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.mina.filter.query;
/**
*
* A message which can be possibly a response to a request.
*
* @author <a href="http://mina.apache.org">Apache MINA Project</a>
*/
public interface Response {
/**
* @return the identifier of the associated request or <code>null</code> if none
*/
public Object requestId();
}
|
apache/mina | 1,175 | http2/src/test/java/org/apache/mina/http2/Http2Test.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.mina.http2;
import java.nio.ByteBuffer;
/**
*
* @author <a href="http://mina.apache.org">Apache MINA Project</a>
*/
public abstract class Http2Test {
protected byte[] toByteArray(ByteBuffer buffer) {
byte[] result = new byte[buffer.remaining()];
buffer.get(result);
return result;
}
}
|
apache/nifi | 1,104 | nifi-extension-bundles/nifi-jms-bundle/nifi-jms-cf-service/src/main/java/org/apache/nifi/jms/cf/JMSConnectionFactoryProviderDefinition.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.jms.cf;
import org.apache.nifi.controller.ControllerService;
/**
* Base interface of controller service implementations of IJMSConnectionFactoryProvider.
*/
public interface JMSConnectionFactoryProviderDefinition extends IJMSConnectionFactoryProvider, ControllerService {
}
|
apache/olingo-odata4 | 1,118 | lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchRequestFactory.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.olingo.client.api.communication.request.batch;
public interface BatchRequestFactory {
/**
* Gets a batch request object instance.
*
* @param serviceRoot service root.
* @return new ODataBatchRequest instance.
*/
ODataBatchRequest getBatchRequest(String serviceRoot);
}
|
apache/openjpa | 1,128 | openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/NonPKJoinPC2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.persistence.jdbc.common.apps;
public class NonPKJoinPC2
extends NonPKJoinPC {
private String stringField;
public String getStringField() {
return this.stringField;
}
public void setStringField(String stringField) {
this.stringField = stringField;
}
}
|
apache/openjpa | 1,136 | openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/CountExpression.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.persistence.query;
/**
* Denotes COUNT(e) Expression.
*
* @author Pinaki Poddar
*
*/
public class CountExpression extends UnaryOperatorExpression {
private static final long serialVersionUID = 1L;
public CountExpression(Expression op) {
super(op, UnaryFunctionalOperator.COUNT);
}
}
|
apache/openjpa | 1,136 | openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/LowerExpression.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.persistence.query;
/**
* Denotes LOWER(e) Expression.
*
* @author Pinaki Poddar
*
*/
public class LowerExpression extends UnaryOperatorExpression {
private static final long serialVersionUID = 1L;
public LowerExpression(Expression op) {
super(op, UnaryFunctionalOperator.LOWER);
}
}
|
apache/openjpa | 1,136 | openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/UpperExpression.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.persistence.query;
/**
* Denotes UPPER(e) Expression.
*
* @author Pinaki Poddar
*
*/
public class UpperExpression extends UnaryOperatorExpression {
private static final long serialVersionUID = 1L;
public UpperExpression(Expression op) {
super(op, UnaryFunctionalOperator.UPPER);
}
}
|
apache/openwebbeans | 1,119 | webbeans-impl/src/test/java/org/apache/webbeans/test/component/inject/named/NamedOtherWithoutNamedValue.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.component.inject.named;
import jakarta.inject.Inject;
import jakarta.inject.Named;
import org.apache.webbeans.test.component.IPayment;
public class NamedOtherWithoutNamedValue
{
@Inject
public NamedOtherWithoutNamedValue(@Named IPayment payment)
{
}
}
|
apache/openwebbeans | 1,122 | webbeans-impl/src/test/java/org/apache/webbeans/test/component/inject/alternative/AlternativeInjector.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.component.inject.alternative;
import jakarta.enterprise.inject.Default;
import jakarta.inject.Inject;
public class AlternativeInjector
{
private @Inject @Default IAlternative alternative;
public IAlternative getAlternative()
{
return this.alternative;
}
}
|
apache/openwebbeans | 1,154 | webbeans-impl/src/main/java/org/apache/webbeans/util/CollectionUtil.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.util;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
public class CollectionUtil
{
public static <T> Set<T> unmodifiableSet(T... entries)
{
Set<T> set = new HashSet<>(Arrays.asList(entries));
return Collections.unmodifiableSet(set);
}
}
|
apache/paimon | 1,138 | paimon-flink/paimon-flink-1.19/src/test/java/org/apache/paimon/flink/RemoveOrphanFilesActionITCase.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.flink;
import org.apache.paimon.flink.action.RemoveOrphanFilesAction;
import org.apache.paimon.flink.action.RemoveOrphanFilesActionITCaseBase;
/** IT cases base for {@link RemoveOrphanFilesAction} in Flink 1.19. */
public class RemoveOrphanFilesActionITCase extends RemoveOrphanFilesActionITCaseBase {}
|
apache/pekko | 1,151 | actor-tests/src/test/java/org/apache/pekko/japi/ThrowablesTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* license agreements; and to You under the Apache License, version 2.0:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* This file is part of the Apache Pekko project, which was derived from Akka.
*/
/*
* Copyright (C) 2014-2022 Lightbend Inc. <https://www.lightbend.com>
*/
package org.apache.pekko.japi;
import org.junit.Assert;
import org.junit.Test;
public class ThrowablesTest {
@Test
public void testIsNonFatal() {
Assert.assertTrue(Throwables.isNonFatal(new IllegalArgumentException("isNonFatal")));
}
@Test
public void testIsFatal() {
Assert.assertTrue(Throwables.isFatal(new StackOverflowError("fatal")));
Assert.assertTrue(Throwables.isFatal(new ThreadDeath()));
Assert.assertTrue(Throwables.isFatal(new InterruptedException("fatal")));
Assert.assertTrue(Throwables.isFatal(new LinkageError("fatal")));
}
private void doSneakyThrow() {
Throwables.sneakyThrow(new Exception("sneaky"));
}
@Test
public void testSneakyThrow() {
Assert.assertThrows("sneaky", Exception.class, this::doSneakyThrow);
}
}
|
apache/phoenix-queryserver | 1,130 | phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/PhoenixMetaFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.phoenix.queryserver.server;
import org.apache.calcite.avatica.Meta;
import org.apache.hadoop.conf.Configurable;
/**
* A @{link Meta.Factory} that can also respect Hadoop
* {@link org.apache.hadoop.conf.Configuration} objects.
*/
public interface PhoenixMetaFactory extends Meta.Factory, Configurable {
}
|
apache/pinot | 1,099 | pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/logicaltable/LogicalTableWithOneOfflineTableIntegrationTest.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.pinot.integration.tests.logicaltable;
import java.util.List;
public class LogicalTableWithOneOfflineTableIntegrationTest extends BaseLogicalTableIntegrationTest {
@Override
protected List<String> getOfflineTableNames() {
return List.of("physicalTable");
}
}
|
apache/pinot | 1,136 | pinot-controller/src/main/java/org/apache/pinot/controller/recommender/data/generator/PatternType.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.pinot.controller.recommender.data.generator;
/**
* PatternType describes the types of time series models available for generation. Each type maps to a dedicated
* generator class in GeneratorFactory.
*
* @see GeneratorFactory
*/
public enum PatternType {
SEASONAL, SPIKE, SEQUENCE, STRING, MIXTURE
}
|
apache/pinot | 1,137 | pinot-core/src/main/java/org/apache/pinot/core/segment/processing/framework/SegmentNumRowProvider.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.pinot.core.segment.processing.framework;
/**
* Interface to compute rows for a segment, using past segment size
* and number of rows. This will be used by SegmentProcessorFramework.
*/
public interface SegmentNumRowProvider {
int getNumRows();
void updateSegmentInfo(int numRows, long segmentSize);
}
|
apache/plc4x | 1,134 | plc4j/drivers/plc4x/src/test/java/org/apache/plc4x/java/plc4x/readwrite/Plc4xParserSerializerTest.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.plc4x.readwrite;
import org.apache.plc4x.test.parserserializer.ParserSerializerTestsuiteRunner;
public class Plc4xParserSerializerTest extends ParserSerializerTestsuiteRunner {
public Plc4xParserSerializerTest() {
super("/protocols/plc4x/ParserSerializerTestsuite.xml");
}
}
|
apache/polygene-java | 1,111 | libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/booleans/IsNullPredicate.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.sql.generator.grammar.booleans;
/**
* The interface for syntax element representing test for something being {@code NULL} (x {@code IS NULL}).
*
* @author Stanislav Muhametsin
*/
public interface IsNullPredicate
extends UnaryPredicate
{
}
|
apache/rocketmq-externals | 1,117 | rocketmq-iot-bridge/src/main/java/org/apache/rocketmq/iot/protocol/mqtt/event/DisconnectChannelEvent.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.iot.protocol.mqtt.event;
import io.netty.channel.Channel;
public class DisconnectChannelEvent {
private Channel channel;
public DisconnectChannelEvent(Channel channel) {
this.channel = channel;
}
public Channel getChannel() {
return channel;
}
}
|
apache/rocketmq-externals | 1,123 | rocketmq-iot-bridge/src/main/java/org/apache/rocketmq/iot/common/configuration/ChannelConfiguration.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.iot.common.configuration;
import io.netty.util.AttributeKey;
public class ChannelConfiguration {
public static final String CHANNEL_IDLE_TIME = "channelIdleTime";
public static final AttributeKey<Integer> CHANNEL_IDLE_TIME_ATTRIBUTE_KEY = AttributeKey.valueOf(CHANNEL_IDLE_TIME);
}
|
apache/rocketmq-externals | 1,125 | rocketmq-iot-bridge/src/main/java/org/apache/rocketmq/iot/protocol/mqtt/constant/MqttConstant.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.iot.protocol.mqtt.constant;
public class MqttConstant {
public static final int MAX_SUPPORTED_QOS = 0;
public static final String SUBSCRIPTION_FLAG_PLUS = "+";
public static final String SUBSCRIPTION_FLAG_SHARP = "#";
public static final String SUBSCRIPTION_SEPARATOR = "/";
}
|
apache/rocketmq-spring | 1,114 | rocketmq-v5-client-spring-boot/src/main/java/org/apache/rocketmq/client/core/RocketMQPushConsumerLifecycleListener.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.client.core;
import org.apache.rocketmq.client.apis.consumer.PushConsumerBuilder;
import org.apache.rocketmq.client.support.RocketMQConsumerLifecycleListener;
public interface RocketMQPushConsumerLifecycleListener extends RocketMQConsumerLifecycleListener<PushConsumerBuilder> {
}
|
apache/seatunnel-web | 1,108 | seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/connector/DataSourceInstance.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.response.connector;
import lombok.AllArgsConstructor;
import lombok.Data;
@Data
@AllArgsConstructor
public class DataSourceInstance {
private DataSourceInfo dataSourceInfo;
private String dataSourceInstanceName;
private Long dataSourceInstanceId;
}
|
apache/seatunnel | 1,098 | seatunnel-connectors-v2/connector-rabbitmq/src/main/java/org/apache/seatunnel/connectors/seatunnel/rabbitmq/source/DeliveryMessage.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.connectors.seatunnel.rabbitmq.source;
import com.rabbitmq.client.Delivery;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
@AllArgsConstructor
@Setter
@Getter
public final class DeliveryMessage {
private final Delivery delivery;
}
|
apache/seatunnel | 1,107 | seatunnel-connectors-v2/connector-hudi/src/main/java/org/apache/seatunnel/connectors/seatunnel/hudi/state/HudiSinkState.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.connectors.seatunnel.hudi.state;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
@Data
@AllArgsConstructor
public class HudiSinkState implements Serializable {
private long checkpointId;
private HudiCommitInfo hudiCommitInfo;
}
|
apache/seatunnel | 1,114 | seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/flow/FlowLifeCycle.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.engine.server.task.flow;
import java.io.IOException;
public interface FlowLifeCycle {
default void init() throws Exception {}
default void open() throws Exception {}
default void close() throws IOException {}
default void prepareClose() throws IOException {}
}
|
apache/servicecomb-java-chassis | 1,084 | foundations/foundation-protobuf/src/test/java/org/apache/servicecomb/foundation/protobuf/internal/schema/scalar/TestSFixed64Schema.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 TestSFixed64Schema extends TestNumberBaseSchema {
public TestSFixed64Schema() {
minValue = Long.MIN_VALUE;
maxValue = Long.MAX_VALUE;
initFields("sfixed64", "objSfixed64");
}
}
|
apache/servicecomb-java-chassis | 1,113 | clients/http-client-common/src/main/java/org/apache/servicecomb/http/client/common/WebSocketListener.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.http.client.common;
import org.java_websocket.handshake.ServerHandshake;
public interface WebSocketListener {
void onMessage(String s);
void onError(Exception e);
void onClose(int code, String reason, boolean remote);
void onOpen(ServerHandshake serverHandshake);
}
|
apache/servicecomb-pack | 1,105 | acceptance-tests/acceptance-pack-spring-demo-with-nacos/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,127 | demo/saga-spring-demo/booking/src/main/java/org/apache/servicecomb/pack/demo/booking/Application.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.demo.booking;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
|
apache/shardingsphere | 1,095 | parser/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/statement/type/ral/queryable/show/ShowComputeNodesStatement.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.distsql.statement.type.ral.queryable.show;
import org.apache.shardingsphere.distsql.statement.type.ral.queryable.QueryableRALStatement;
/**
* Show compute nodes statement.
*/
public final class ShowComputeNodesStatement extends QueryableRALStatement {
}
|
apache/shardingsphere | 1,101 | kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/task/progress/IncrementalTaskDelay.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.task.progress;
import lombok.Getter;
import lombok.Setter;
/**
* Incremental task delay.
*/
@Getter
@Setter
public final class IncrementalTaskDelay {
private long lastEventTimestamps;
private long latestActiveTimeMillis;
}
|
apache/shardingsphere | 1,120 | jdbc/src/main/java/org/apache/shardingsphere/driver/executor/callback/replay/StatementReplayCallback.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.driver.executor.callback.replay;
import java.sql.SQLException;
/**
* Statement replay callback.
*/
public interface StatementReplayCallback {
/**
* Replay statements.
*
* @throws SQLException SQL exception
*/
void replay() throws SQLException;
}
|
apache/shardingsphere | 1,121 | features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/constant/EncryptColumnDataType.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.encrypt.constant;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
/**
* Encrypt column data type.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class EncryptColumnDataType {
public static final String DEFAULT_DATA_TYPE = "VARCHAR(4000)";
}
|
apache/shenyu | 1,126 | shenyu-e2e/shenyu-e2e-engine/src/main/java/org/apache/shenyu/e2e/engine/scenario/ShenYuScenarioProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.shenyu.e2e.engine.scenario;
import org.apache.shenyu.e2e.engine.scenario.specification.ScenarioSpec;
import java.util.List;
@FunctionalInterface
public interface ShenYuScenarioProvider {
/**
* get scenario specifications list.
* @return List
*/
List<ScenarioSpec> get();
}
|
apache/shenyu | 1,146 | shenyu-admin/src/test/java/org/apache/shenyu/admin/model/query/PluginHandleQueryTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.shenyu.admin.model.query;
import org.apache.shenyu.admin.AbstractReflectGetterSetterTest;
/**
* Test case for PluginHandleQuery.
*/
public final class PluginHandleQueryTest extends AbstractReflectGetterSetterTest {
@Override
protected Class<?> getTargetClass() {
return PluginHandleQuery.class;
}
}
|
apache/shiro | 1,154 | support/jakarta-ee/src/main/java/org/apache/shiro/ee/cdi/ShiroOmniViewScoped.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 @org.omnifaces.cdi.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 ShiroOmniViewScoped {
}
|
apache/skywalking-java | 1,093 | test/plugin/scenarios/dubbo-2.5.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/dubbo/services/impl/GreetServiceImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.testcase.dubbo.services.impl;
import org.apache.skywalking.apm.testcase.dubbo.services.GreetService;
public class GreetServiceImpl implements GreetService {
@Override
public String doBusiness() {
return "{name:'helloWorld'}";
}
}
|
apache/skywalking | 1,105 | oap-server/server-library/library-module/src/main/java/org/apache/skywalking/oap/server/library/module/ModuleStartException.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.module;
public class ModuleStartException extends Exception {
public ModuleStartException(String message) {
super(message);
}
public ModuleStartException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/skywalking | 1,107 | oap-server/oal-rt/src/main/java/org/apache/skywalking/oap/server/core/source/oal/rt/dispatcher/DispatcherClassPackageHolder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.oap.server.core.source.oal.rt.dispatcher;
/**
* DispatcherClassPackageHolder holds the package for generated metric classes.
*
* @since 8.9.0 for adopting JDK16+ to avoid `--add-opens java.base/java.lang=ALL-UNNAMED`
*/
public class DispatcherClassPackageHolder {
}
|
apache/skywalking | 1,130 | oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/status/ClusterStatus.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.oap.server.core.status;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
/**
* Booting status indicate whether the current server starts successfully.
*/
@Getter
@Setter(AccessLevel.PACKAGE)
public class ClusterStatus {
private volatile long rebalancedTime = 0;
}
|
apache/skywalking | 1,137 | oap-server/server-core/src/test/java/org/apache/skywalking/oap/server/core/CoreModuleTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.oap.server.core;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class CoreModuleTest {
@Test
public void testOpenServiceList() {
CoreModule coreModule = new CoreModule();
Assertions.assertEquals(49, coreModule.services().length);
}
}
|
apache/solr | 1,167 | solr/core/src/test/org/apache/solr/metrics/MockCounterSupplier.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.metrics;
import com.codahale.metrics.Counter;
import com.codahale.metrics.MetricRegistry;
/** */
public class MockCounterSupplier implements MetricRegistry.MetricSupplier<Counter> {
public String foo;
public void setFoo(String foo) {
this.foo = foo;
}
@Override
public Counter newMetric() {
return new Counter();
}
}
|
apache/storm | 1,169 | storm-client/src/jvm/org/apache/storm/topology/FailedException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version
* 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package org.apache.storm.topology;
public class FailedException extends RuntimeException {
public FailedException() {
super();
}
public FailedException(String msg) {
super(msg);
}
public FailedException(String msg, Throwable cause) {
super(msg, cause);
}
public FailedException(Throwable cause) {
super(cause);
}
}
|
apache/storm | 1,170 | storm-client/src/jvm/org/apache/storm/trident/topology/BatchInfo.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version
* 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package org.apache.storm.trident.topology;
import org.apache.storm.trident.spout.IBatchID;
public class BatchInfo {
public IBatchID batchId;
public Object state;
public String batchGroup;
public BatchInfo(String batchGroup, IBatchID batchId, Object state) {
this.batchGroup = batchGroup;
this.batchId = batchId;
this.state = state;
}
}
|
apache/submarine | 1,111 | submarine-server/server-database/src/main/java/org/apache/submarine/server/database/model/mappers/ModelVersionTagMapper.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.submarine.server.database.model.mappers;
import org.apache.submarine.server.database.model.entities.ModelVersionTagEntity;
public interface ModelVersionTagMapper {
void insert(ModelVersionTagEntity registeredModelTag);
void delete(ModelVersionTagEntity registeredModelTag);
}
|
apache/synapse | 1,139 | modules/integration/src/test/java/org/apache/synapse/samples/framework/ProcessController.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.synapse.samples.framework;
/**
* Specifies the operations associated with controlling
* the mediation engine - starting up and shutting down.
*/
public interface ProcessController {
public boolean startProcess();
public boolean stopProcess();
public String getServerName();
} |
apache/syncope | 1,138 | core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/AccountGetter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.syncope.core.provisioning.api;
import java.util.function.Function;
import org.apache.syncope.core.persistence.api.entity.user.Account;
@FunctionalInterface
@SuppressWarnings("squid:S1214")
public interface AccountGetter extends Function<Account, Account> {
AccountGetter DEFAULT = account -> account;
}
|
apache/tapestry-5 | 1,138 | tapestry-beanvalidator/src/test/java/org/example/testapp/pages/ClientValidationDemo.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.example.testapp.pages;
import org.apache.tapestry5.annotations.Import;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.internal.services.StringValueEncoder;
import org.example.testapp.entities.TestEntity;
@Import(stack = "core")
public class ClientValidationDemo
{
@Property
@Persist
private TestEntity testEntity;
public StringValueEncoder getStringValueEncoder()
{
return new StringValueEncoder();
}
}
|
apache/tapestry-5 | 1,142 | commons/src/main/java/org/apache/tapestry5/commons/util/CoercionFailedException.java | // Copyright 2021 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.commons.util;
import org.apache.tapestry5.commons.internal.util.TapestryException;
import org.apache.tapestry5.commons.services.Coercion;
/**
* Exception used when a {@link Coercion} throws an exception while
* trying to coerce a value.
*
* @since 5.8.0
*/
public class CoercionFailedException extends TapestryException
{
private static final long serialVersionUID = 1L;
public CoercionFailedException(String message, Throwable cause)
{
super(message, cause);
}
}
|
apache/tapestry-5 | 1,150 | tapestry-func/src/main/java/org/apache/tapestry5/func/LazyIterator.java | // Copyright 2010, 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.apache.tapestry5.func;
import java.util.Iterator;
/**
* Converts an {@link Iterator} into a {@link LazyFunction}.
*/
class LazyIterator<T> implements LazyFunction<T>
{
private final Iterator<T> iterator;
public LazyIterator(Iterator<T> iterator)
{
assert iterator != null;
this.iterator = iterator;
}
@Override
public LazyContinuation<T> next()
{
if (!iterator.hasNext())
return null;
return new LazyContinuation<T>(iterator.next(), this);
}
}
|
apache/tomcat80 | 1,187 | java/javax/websocket/SessionException.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 javax.websocket;
public class SessionException extends Exception {
private static final long serialVersionUID = 1L;
private final Session session;
public SessionException(String message, Throwable cause, Session session) {
super(message, cause);
this.session = session;
}
public Session getSession() {
return session;
}
}
|
apache/tomee | 1,086 | arquillian/arquillian-tomee-tests/arquillian-tomee-jaxws-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxws/openejbjar/LengthCalculator.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.jaxws.openejbjar;
import jakarta.ejb.Stateless;
import jakarta.jws.WebService;
@WebService
@Stateless(name = "LengthCalculator")
public class LengthCalculator {
public int length(String in) {
return in.length();
}
}
|
apache/tomee | 1,109 | arquillian/arquillian-tomee-tests/arquillian-tomee-jms-tests/src/test/java/org/superbiz/connector/api/SampleConnectionFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.superbiz.connector.api;
import jakarta.resource.Referenceable;
import jakarta.resource.ResourceException;
import java.io.Serializable;
public interface SampleConnectionFactory extends Serializable, Referenceable {
public SampleConnection getConnection() throws ResourceException;
}
|
apache/tomee | 1,148 | examples/movies-complete/src/main/java/org/superbiz/injection/tx/DeleteInterceptor.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.superbiz.injection.tx;
import jakarta.interceptor.AroundInvoke;
import jakarta.interceptor.InvocationContext;
/**
* @version $Revision$ $Date$
*/
public class DeleteInterceptor {
@AroundInvoke
public Object invoke(InvocationContext context) throws Exception {
// Log Delete
return context.proceed();
}
}
|
apache/usergrid | 1,119 | stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/exceptions/NotFoundException.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.exceptions;
public class NotFoundException extends QakkaRuntimeException {
public NotFoundException(String message) {
super( message );
}
public NotFoundException(String message, Throwable cause) {
super( message, cause );
}
}
|
apache/wicket | 1,127 | wicket-core-tests/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup.parser.filter;
import org.apache.wicket.markup.html.WebPage;
/**
* Mock page for testing.
*
* @author Chris Turner
*/
public class HeaderSectionPage_1 extends WebPage
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*/
public HeaderSectionPage_1()
{
}
}
|
apache/wicket | 1,127 | wicket-core-tests/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup.parser.filter;
import org.apache.wicket.markup.html.WebPage;
/**
* Mock page for testing.
*
* @author Chris Turner
*/
public class HeaderSectionPage_2 extends WebPage
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*/
public HeaderSectionPage_2()
{
}
}
|
apache/wicket | 1,127 | wicket-core-tests/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_3.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup.parser.filter;
import org.apache.wicket.markup.html.WebPage;
/**
* Mock page for testing.
*
* @author Chris Turner
*/
public class HeaderSectionPage_3 extends WebPage
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*/
public HeaderSectionPage_3()
{
}
}
|
apache/wicket | 1,129 | wicket-core-tests/src/test/java/org/apache/wicket/markup/html/link/ExternalLinkPage_1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup.html.link;
import org.apache.wicket.markup.html.WebPage;
/**
*/
public class ExternalLinkPage_1 extends WebPage
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*/
public ExternalLinkPage_1()
{
add(new ExternalLink("myLink", "http://wicket.apache.org"));
}
}
|
apache/wicket | 1,147 | wicket-core-tests/src/test/java/org/apache/wicket/MockPageWithOneComponent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket;
import org.apache.wicket.markup.html.WebPage;
/**
*
* @author Frank Bille
*/
public class MockPageWithOneComponent extends WebPage
{
private static final long serialVersionUID = 1L;
/**
* Use this wicketid when adding a component to the page.
*/
public static final String COMPONENT_ID = "component";
}
|
apache/zeppelin | 1,143 | elasticsearch/src/main/java/org/apache/zeppelin/elasticsearch/action/ActionException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.zeppelin.elasticsearch.action;
/**
* Runtime exception thrown when there is a problem during an action (search, get, ...).
*/
public class ActionException extends RuntimeException {
public ActionException(String message) {
super(message);
}
public ActionException(Throwable cause) {
super(cause);
}
}
|
google/caliper | 1,145 | caliper-runner/src/main/java/com/google/caliper/runner/instrument/InstrumentOptions.java | /*
* Copyright (C) 2012 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.caliper.runner.instrument;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import javax.inject.Qualifier;
/** Binding annotation for the options applied to an instrument. */
@Retention(RUNTIME)
@Target({FIELD, PARAMETER, METHOD})
@Qualifier
@interface InstrumentOptions {}
|
google/guava | 1,162 | android/guava-tests/test/com/google/common/io/TestStreamSupplier.java | /*
* Copyright (C) 2012 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.common.io;
import org.jspecify.annotations.NullUnmarked;
/**
* Interface for a supplier of streams that can report whether a stream was opened and whether that
* stream was closed. Intended for use in a test where only a single stream should be opened and
* possibly closed.
*
* @author Colin Decker
*/
@NullUnmarked
public interface TestStreamSupplier {
/** Returns whether or not a new stream was opened. */
boolean wasStreamOpened();
/** Returns whether or not an open stream was closed. */
boolean wasStreamClosed();
}
|
google/j2cl | 1,145 | transpiler/javatests/com/google/j2cl/integration/java/arithmeticexceptiondisabled/Main.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
*
* 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 arithmeticexceptiondisabled;
import static com.google.j2cl.integration.testing.Asserts.assertTrue;
public class Main {
public static void main(String... args) {
int a = 10;
int b = 0;
// This should fail! But we've turned off arithmetic exception in the BUILD file.
int c = a / b;
// Use the resulting value, to prove that size reductions are not accidentally because
// the object was unused and JSCompiler decided to delete the cast on an unused thing.
assertTrue(c < 100);
assertTrue(c > -100);
}
}
|
google/java-photoslibrary | 1,115 | photoslibraryapi/src/main/java/com/google/photos/library/v1/proto/ShareAlbumResponseOrBuilder.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/photos/library/v1/photos_library.proto
package com.google.photos.library.v1.proto;
public interface ShareAlbumResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.photos.library.v1.ShareAlbumResponse)
com.google.protobuf.MessageOrBuilder {
/**
*
*
* <pre>
* Output only. Information about the shared album.
* </pre>
*
* <code>.google.photos.types.ShareInfo share_info = 1;</code>
*
* @return Whether the shareInfo field is set.
*/
boolean hasShareInfo();
/**
*
*
* <pre>
* Output only. Information about the shared album.
* </pre>
*
* <code>.google.photos.types.ShareInfo share_info = 1;</code>
*
* @return The shareInfo.
*/
com.google.photos.types.proto.ShareInfo getShareInfo();
/**
*
*
* <pre>
* Output only. Information about the shared album.
* </pre>
*
* <code>.google.photos.types.ShareInfo share_info = 1;</code>
*/
com.google.photos.types.proto.ShareInfoOrBuilder getShareInfoOrBuilder();
}
|
google/oss-fuzz | 1,193 | projects/fastcsv/CsvReaderFuzzer.java | // Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
import java.io.ByteArrayInputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import de.siegmar.fastcsv.reader.CsvReader;
import de.siegmar.fastcsv.reader.CsvParseException;
public class CsvReaderFuzzer {
public static void fuzzerTestOneInput(byte[] input) {
try {
CsvReader.builder()
.ofCsvRecord(new InputStreamReader(new ByteArrayInputStream(input), StandardCharsets.UTF_8))
.stream()
.toList();
} catch (CsvParseException e) {
}
}
}
|
googleapis/google-cloud-java | 1,087 | java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/ResourceManagerOptionsTest.java | /*
* Copyright 2017 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.cloud.resourcemanager;
import static org.junit.Assert.fail;
import com.google.cloud.TransportOptions;
import org.easymock.EasyMock;
import org.junit.Test;
public class ResourceManagerOptionsTest {
@Test
public void testInvalidTransport() {
try {
ResourceManagerOptions.newBuilder()
.setTransportOptions(EasyMock.<TransportOptions>createMock(TransportOptions.class));
fail();
} catch (IllegalArgumentException expected) {
}
}
}
|
hibernate/hibernate-orm | 1,079 | hibernate-envers/src/main/java/org/hibernate/envers/query/criteria/internal/RevisionTypeAuditExpression.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.envers.query.criteria.internal;
import org.hibernate.envers.boot.internal.EnversService;
import org.hibernate.envers.internal.reader.AuditReaderImplementor;
import org.hibernate.envers.internal.tools.query.Parameters;
import org.hibernate.envers.internal.tools.query.QueryBuilder;
/**
* @author Adam Warski (adam at warski dot org)
* @author Chris Cranford
*/
public class RevisionTypeAuditExpression extends AbstractAtomicExpression {
private Object value;
private String op;
public RevisionTypeAuditExpression(String alias, Object value, String op) {
super( alias );
this.value = value;
this.op = op;
}
@Override
protected void addToQuery(
EnversService enversService,
AuditReaderImplementor versionsReader,
String entityName,
String alias,
String componentPrefix,
QueryBuilder qb,
Parameters parameters) {
parameters.addWhereWithParam( alias, enversService.getConfig().getRevisionTypePropertyName(), op, value );
}
}
|
hibernate/hibernate-orm | 1,080 | hibernate-envers/src/test/java/org/hibernate/orm/test/envers/performance/InsertsPerformance.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.envers.performance;
import java.io.IOException;
import jakarta.persistence.EntityManager;
import org.hibernate.orm.test.envers.entities.StrTestEntity;
import org.junit.Ignore;
/**
* @author Adam Warski (adam at warski dot org)
*/
@Ignore
public class InsertsPerformance extends AbstractPerformanceTest {
@Override
protected Class[] getAnnotatedClasses() {
return new Class[] {StrTestEntity.class};
}
private final static int NUMBER_INSERTS = 5000;
protected void doTest() {
for ( int i = 0; i < NUMBER_INSERTS; i++ ) {
newEntityManager();
EntityManager entityManager = getEntityManager();
entityManager.getTransaction().begin();
start();
entityManager.persist( new StrTestEntity( "x" + i ) );
entityManager.getTransaction().commit();
stop();
}
}
public static void main(String[] args) throws IOException {
InsertsPerformance insertsPerformance = new InsertsPerformance();
insertsPerformance.test( 3 );
}
}
|
hibernate/hibernate-orm | 1,081 | hibernate-core/src/main/java/org/hibernate/sql/ast/tree/from/AbstractTableReference.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.sql.ast.tree.from;
import java.util.Objects;
public abstract class AbstractTableReference implements TableReference {
protected final String identificationVariable;
protected final boolean isOptional;
public AbstractTableReference(String identificationVariable, boolean isOptional) {
assert identificationVariable != null;
this.identificationVariable = identificationVariable;
this.isOptional = isOptional;
}
@Override
public String getIdentificationVariable() {
return identificationVariable;
}
@Override
public boolean isOptional() {
return isOptional;
}
@Override
public boolean equals(Object o) {
if ( this == o ) {
return true;
}
if ( o == null || getClass() != o.getClass() ) {
return false;
}
TableReference that = (TableReference) o;
return Objects.equals( identificationVariable, that.getIdentificationVariable() );
}
@Override
public int hashCode() {
return Objects.hash( identificationVariable );
}
}
|
hibernate/hibernate-orm | 1,084 | tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/embeddable/EmbeddableTypeUseTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.processor.test.embeddable;
import org.hibernate.processor.test.util.CompilationTest;
import org.hibernate.processor.test.util.TestForIssue;
import org.hibernate.processor.test.util.TestUtil;
import org.hibernate.processor.test.util.WithClasses;
import org.junit.jupiter.api.Test;
import static org.hibernate.processor.test.util.TestUtil.assertAttributeTypeInMetaModelFor;
import static org.hibernate.processor.test.util.TestUtil.assertMetamodelClassGeneratedFor;
/**
* @author Chris Cranford
*/
@CompilationTest
@TestForIssue(jiraKey = "HHH-12612")
class EmbeddableTypeUseTest {
@Test
@WithClasses({SimpleEntity.class})
void testAnnotatedEmbeddable() {
System.out.println( TestUtil.getMetaModelSourceAsString( SimpleEntity.class ) );
assertMetamodelClassGeneratedFor( SimpleEntity.class );
assertAttributeTypeInMetaModelFor(
SimpleEntity.class,
"simpleEmbeddable",
SimpleEmbeddable.class,
"Wrong type for embeddable attribute."
);
}
}
|
hibernate/hibernate-search | 1,040 | integrationtest/mapper/pojo-base/src/test/java/org/hibernate/search/integrationtest/mapper/pojo/schema/management/strategy/SchemaManagementStrategyCreateOrValidateIT.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.integrationtest.mapper.pojo.schema.management.strategy;
import org.hibernate.search.mapper.pojo.standalone.schema.management.SchemaManagementStrategyName;
import org.hibernate.search.util.impl.integrationtest.common.extension.SchemaManagementWorkBehavior;
import org.hibernate.search.util.impl.integrationtest.common.stub.backend.index.StubSchemaManagementWork;
class SchemaManagementStrategyCreateOrValidateIT extends AbstractSchemaManagementStrategyValidatingIT {
@Override
protected SchemaManagementStrategyName getStrategyName() {
return SchemaManagementStrategyName.CREATE_OR_VALIDATE;
}
@Override
protected void expectWork(String indexName, SchemaManagementWorkBehavior behavior) {
backendMock.expectSchemaManagementWorks( indexName )
.work( StubSchemaManagementWork.Type.CREATE_OR_VALIDATE, behavior );
}
@Override
protected void expectOnClose(String indexName) {
// No expectation
}
}
|
hibernate/hibernate-search | 1,056 | backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/search/aggregation/impl/AbstractElasticsearchAggregation.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.backend.elasticsearch.search.aggregation.impl;
import java.util.Set;
import org.hibernate.search.backend.elasticsearch.search.common.impl.ElasticsearchSearchIndexScope;
import org.hibernate.search.engine.search.aggregation.spi.SearchAggregationBuilder;
public abstract class AbstractElasticsearchAggregation<A> implements ElasticsearchSearchAggregation<A> {
private final Set<String> indexNames;
AbstractElasticsearchAggregation(AbstractBuilder<A> builder) {
this.indexNames = builder.scope.hibernateSearchIndexNames();
}
@Override
public final Set<String> indexNames() {
return indexNames;
}
public abstract static class AbstractBuilder<A> implements SearchAggregationBuilder<A> {
protected final ElasticsearchSearchIndexScope<?> scope;
public AbstractBuilder(ElasticsearchSearchIndexScope<?> scope) {
this.scope = scope;
}
@Override
public abstract ElasticsearchSearchAggregation<A> build();
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.