repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/jclouds | 1,157 | apis/glacier/src/test/java/org/jclouds/glacier/GlacierApiMetadataTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.glacier;
import org.jclouds.blobstore.internal.BaseBlobStoreApiMetadataTest;
import org.testng.annotations.Test;
@Test(groups = "unit", testName = "GlacierApiMetadataTest")
public class GlacierApiMetadataTest extends BaseBlobStoreApiMetadataTest {
public GlacierApiMetadataTest() {
super(new GlacierApiMetadata());
}
}
|
apache/jena | 1,129 | jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/prefixes/TestPrefixesServicePlain.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.fuseki.main.prefixes;
import org.apache.jena.fuseki.servlets.prefixes.PrefixesPlain;
/** Test the {@link PrefixesPlain} implementation. */
public class TestPrefixesServicePlain extends AbstractTestPrefixesImpl {
public TestPrefixesServicePlain() {
super(new PrefixesPlain());
}
}
|
apache/jena | 1,160 | jena-core/src/main/java/org/apache/jena/shared/DoesNotExistException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.shared;
/**
Exception thrown when an attempt is made find an entity by name, but it
cannot be located.
*/
public class DoesNotExistException extends JenaException
{
/**
The entity <code>name</code> does not exist.
*/
public DoesNotExistException( String name )
{ super( name); }
}
|
apache/jena | 1,167 | jena-shex/src/test/java/org/apache/jena/shex/TestShexSyntax.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.shex;
import org.apache.jena.arq.junit4.runners.Directories;
import org.apache.jena.arq.junit4.runners.Label;
import org.apache.jena.shex.runner.RunnerShexSyntax;
import org.junit.runner.RunWith;
@RunWith(RunnerShexSyntax.class)
@Label("Shex Syntax")
@Directories({
"src/test/files/spec/syntax"
})
public class TestShexSyntax {}
|
apache/jena | 1,170 | jena-iri/src/main/java/org/apache/jena/iri/impl/HostAction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.iri.impl;
import java.util.regex.Matcher;
public class HostAction extends GroupAction {
final private int group;
HostAction(int group) {
this.group = group;
}
@Override
public void check(Matcher m, Parser parser, int range) {
Parser.hostLexer().analyse(parser,range,m.group(group));
}
}
|
apache/jena | 1,174 | jena-arq/src/main/java/org/apache/jena/sparql/AlreadyExists.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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;
import org.apache.jena.shared.JenaException ;
public class AlreadyExists extends JenaException
{
public AlreadyExists() { super() ; }
public AlreadyExists(Throwable cause) { super(cause) ; }
public AlreadyExists(String msg) { super(msg) ; }
public AlreadyExists(String msg, Throwable cause) { super(msg, cause) ; }
}
|
apache/jmeter | 1,168 | src/core/src/test/java/org/apache/jmeter/util/PackageTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to you under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.jmeter.util;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import org.junit.jupiter.api.Test;
public class PackageTest {
@Test
public void testServer() throws Exception {
BeanShellServer bshs = new BeanShellServer(9876, "");
assertNotNull(bshs);
// Not sure we can test anything else here
}
}
|
apache/kafka | 1,155 | generator/src/main/java/org/apache/kafka/message/checker/EvolutionException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.message.checker;
/**
* An exception thrown when a schema is evolved an invalid way.
*/
public class EvolutionException extends RuntimeException {
public EvolutionException(String message, Throwable t) {
super(message, t);
}
public EvolutionException(String message) {
super(message, null);
}
}
|
apache/kylin | 1,134 | src/common-service/src/main/java/org/apache/kylin/rest/request/PushDownProjectConfigRequest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kylin.rest.request;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
@Data
public class PushDownProjectConfigRequest {
@JsonProperty("runner_class_name")
private String runnerClassName;
@JsonProperty("converter_class_names")
private String converterClassNames;
}
|
apache/kylin | 1,140 | src/modeling-service/src/main/java/org/apache/kylin/rest/service/params/PaginationParams.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kylin.rest.service.params;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PaginationParams {
private Integer pageOffset;
private Integer pageSize;
private String orderBy;
private Boolean reverse;
}
|
apache/kyuubi | 1,165 | kyuubi-util-scala/src/test/java/org/apache/kyuubi/tags/IcebergTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.kyuubi.tags;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.scalatest.TagAnnotation;
@TagAnnotation
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface IcebergTest {}
|
apache/kyuubi | 1,165 | kyuubi-util-scala/src/test/java/org/apache/kyuubi/tags/PySparkTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.kyuubi.tags;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.scalatest.TagAnnotation;
@TagAnnotation
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface PySparkTest {}
|
apache/lens | 1,165 | lens-api/src/main/java/org/apache/lens/api/result/PrettyPrintable.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.lens.api.result;
/**
* Contents of a class which implements this interface can be represented in a pretty formatted string.
*/
public interface PrettyPrintable {
/**
* Returns the contents of this object in the form of a pretty formatted string.
*
* @return contents as formatted String
*/
String toPrettyString();
}
|
apache/linkis | 1,082 | linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/java/org/apache/linkis/manager/am/conf/EngineConnConfigurationService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.linkis.manager.am.conf;
import org.apache.linkis.manager.label.entity.Label;
import java.util.List;
import java.util.Map;
public interface EngineConnConfigurationService {
Map<String, String> getConsoleConfiguration(List<? extends Label<?>> labelList);
}
|
apache/linkis | 1,106 | linkis-engineconn-plugins/spark/src/main/java/org/apache/linkis/engineplugin/spark/client/deployment/crds/RestartPolicy.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.linkis.engineplugin.spark.client.deployment.crds;
public class RestartPolicy {
private String type;
public RestartPolicy(String type) {
this.type = type;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
|
apache/logging-log4j2 | 1,135 | log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/FelixLoadApiBundleTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to you under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.logging.log4j.osgi.tests;
import org.apache.felix.framework.FrameworkFactory;
/**
* Tests loading the Core bundle into an Apache Felix OSGi container.
*/
public class FelixLoadApiBundleTest extends AbstractLoadBundleTest {
public FelixLoadApiBundleTest() {
super(new FrameworkFactory());
}
}
|
apache/logging-log4j2 | 1,149 | log4j-1.2-api/src/test/java/org/apache/log4j/config/NeutralFilterFixture.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to you under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.log4j.config;
import org.apache.log4j.spi.Filter;
import org.apache.log4j.spi.LoggingEvent;
/**
* A test fixture used by {@code src/test/resources/LOG4J2-3247.properties}.
*/
public class NeutralFilterFixture extends Filter {
@Override
public int decide(final LoggingEvent event) {
return NEUTRAL;
}
}
|
apache/lucene | 1,132 | lucene/analysis/kuromoji/src/java/org/apache/lucene/analysis/ja/tokenattributes/PartOfSpeechAttribute.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.lucene.analysis.ja.tokenattributes;
import org.apache.lucene.analysis.ja.Token;
import org.apache.lucene.util.Attribute;
/** Attribute for {@link Token#getPartOfSpeech()}. */
public interface PartOfSpeechAttribute extends Attribute {
public String getPartOfSpeech();
public void setToken(Token token);
}
|
apache/lucene | 1,138 | lucene/analysis/common/src/test/org/apache/lucene/analysis/hunspell/TestDoubleEscape.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.lucene.analysis.hunspell;
import org.junit.BeforeClass;
public class TestDoubleEscape extends StemmerTestBase {
@BeforeClass
public static void beforeClass() throws Exception {
init("double-escaped.aff", "double-escaped.dic");
}
public void testStemming() {
assertStemsTo("adubo", "adubar");
}
}
|
apache/maven-assembly-plugin | 1,123 | src/main/java/org/apache/maven/plugins/assembly/interpolation/AssemblyInterpolationException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.assembly.interpolation;
/**
*
*/
public class AssemblyInterpolationException extends Exception {
private static final long serialVersionUID = 1L;
public AssemblyInterpolationException(final String message, final Throwable cause) {
super(message, cause);
}
}
|
apache/maven-javadoc-plugin | 1,144 | src/it/projects/MJAVADOC-508/src/main/java/foo/bar/ALotOfLinkTags.java | package foo.bar;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT 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.Serializable;
import java.util.HashSet;
import java.util.*;
public class ALotOfLinkTags
implements Serializable
{
public int field; // intentionally not marked @serial to cause a javadoc warning
/**
*/
public boolean aMethod( String[] args )
{
return true;
}
}
|
apache/maven-surefire | 1,047 | surefire-its/src/test/resources/surefire-1146-rerunFailingTests-with-Parameterized/src/test/java/jiras/surefire1146/CustomDescriptionParameterizedTest.java | package jiras.surefire1146;
import java.util.ArrayList;
import java.util.List;
import junit.runner.Version;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import static org.junit.Assert.*;
@RunWith( Parameterized.class )
public class CustomDescriptionParameterizedTest
{
private static boolean success;
public CustomDescriptionParameterizedTest( String test1, String test2, String test3 )
{
}
@Parameters( name = "{index}: ({0}); {1}; {2};" )
public static List getParameters()
{
List parameters = new ArrayList();
parameters.add( new String[]{ "Test11", "Test12", "Test13" } );
parameters.add( new String[]{ "Test21", "Test22", "Test23" } );
return parameters;
}
@Test
public void flakyTest()
{
System.out.println( "Running JUnit " + Version.id() );
boolean current = success;
success = !success;
assertTrue( current );
}
}
|
apache/metamodel | 1,160 | core/src/main/java/org/apache/metamodel/query/builder/JoinFromBuilder.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.metamodel.query.builder;
import org.apache.metamodel.schema.Column;
public interface JoinFromBuilder extends SatisfiedFromBuilder {
public SatisfiedFromBuilder on(Column left, Column right) throws IllegalArgumentException;
public SatisfiedFromBuilder on(String left, String right) throws IllegalArgumentException;
} |
apache/mina-sshd | 1,138 | sshd-core/src/main/java/org/apache/sshd/common/session/SessionDisconnectHandlerManager.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sshd.common.session;
/**
* TODO Add javadoc
*
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
public interface SessionDisconnectHandlerManager {
SessionDisconnectHandler getSessionDisconnectHandler();
void setSessionDisconnectHandler(SessionDisconnectHandler handler);
}
|
apache/nifi | 1,134 | nifi-framework-api/src/main/java/org/apache/nifi/controller/queue/LocalQueuePartitionDiagnostics.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.controller.queue;
public interface LocalQueuePartitionDiagnostics {
QueueSize getUnacknowledgedQueueSize();
QueueSize getActiveQueueSize();
QueueSize getSwapQueueSize();
int getSwapFileCount();
boolean isAnyActiveFlowFilePenalized();
boolean isAllActiveFlowFilesPenalized();
}
|
apache/oodt | 1,154 | cli/src/main/java/org/apache/oodt/cas/cli/option/store/CmdLineOptionStore.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.oodt.cas.cli.option.store;
//JDK imports
import java.util.Set;
//OODT imports
import org.apache.oodt.cas.cli.option.CmdLineOption;
/**
* Storage for loading supported {@link CmdLineOption}s.
*
* @author bfoster (Brian Foster)
*/
public interface CmdLineOptionStore {
Set<CmdLineOption> loadSupportedOptions()
;
}
|
apache/openjpa | 1,114 | openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestMultiColumnVersionXML.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.annotations;
public class TestMultiColumnVersionXML extends TestMultiColumnVersion {
@Override
public void setUp() {
super.setUp();
}
@Override
protected String getPersistenceUnitName() {
return "version-columns-xml";
}
}
|
apache/openjpa | 1,126 | openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entity/SharedName1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.inheritance.entity;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
/**
* This class has the same name as {@link
* org.apache.openjpa.persistence.inheritance.mappedsuperclass.SharedName1}
*/
@Entity
public class SharedName1 {
@Id
private long id;
}
|
apache/openjpa | 1,163 | openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/Sized.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.jdbc.sql;
/**
* A sized value. Used to represent both a value and its size for calls
* to {@link Row#setObject}.
*
* @author Abe White
*/
public class Sized {
public final Object value;
public final int size;
public Sized(Object value, int size) {
this.value = value;
this.size = size;
}
}
|
apache/opennlp | 1,136 | opennlp-tools/src/test/java/opennlp/tools/util/normalizer/NumberCharSequenceNormalizerTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package opennlp.tools.util.normalizer;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class NumberCharSequenceNormalizerTest {
@Test
void normalize() {
Assertions.assertEquals("absc , abcd",
NumberCharSequenceNormalizer.getInstance().normalize("absc 123,0123 abcd"));
}
}
|
apache/openwebbeans | 1,113 | webbeans-impl/src/test/java/org/apache/webbeans/test/component/producer/broken/BrokenProducerComponent1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.producer.broken;
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Inject;
public class BrokenProducerComponent1
{
public BrokenProducerComponent1()
{
}
@Produces
@Inject
public int broken1()
{
return 0;
}
}
|
apache/openwebbeans | 1,113 | webbeans-impl/src/test/java/org/apache/webbeans/test/component/producer/broken/BrokenProducerComponent2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.producer.broken;
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Inject;
public class BrokenProducerComponent2
{
public BrokenProducerComponent2()
{
}
@Produces
@Inject
public int broken2()
{
return 0;
}
}
|
apache/openwebbeans | 1,138 | webbeans-impl/src/test/java/org/apache/webbeans/test/specalization/multiple/BeanB2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.specalization.multiple;
import jakarta.enterprise.inject.Specializes;
/**
* invalid as there must not be multiple classes which specialize the same bean.
*/
@Specializes
public class BeanB2 extends BeanA
{
@Override
public Class getBeanClass()
{
return BeanB2.class;
}
}
|
apache/openwebbeans | 1,144 | webbeans-jetty9/src/test/java/org/apache/webbeans/web/jetty9/test/MyWrapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.web.jetty9.test;
import java.io.Serializable;
import jakarta.enterprise.context.SessionScoped;
import jakarta.inject.Inject;
@SessionScoped
public class MyWrapper implements Serializable {
@Inject
private MySessionScoped proxy;
public MySessionScoped getProxy()
{
return proxy;
}
}
|
apache/ozhera | 1,099 | ozhera-intelligence/ozhera-intelligence-domain/src/main/java/org/apache/ozhera/intelligence/domain/rootanalysis/TraceQueryParam.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ozhera.intelligence.domain.rootanalysis;
import lombok.Builder;
import lombok.Data;
import lombok.ToString;
import java.util.List;
@Data
@Builder
@ToString
public class TraceQueryParam {
private String traceId;
private String env;
private Long timeStamp;
}
|
apache/paimon | 1,143 | paimon-flink/paimon-flink1-common/src/main/java/org/apache/flink/types/variant/Variant.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.types.variant;
import org.apache.flink.annotation.PublicEvolving;
import java.io.Serializable;
/** Variant represent a semi-structured data. */
@PublicEvolving
public interface Variant extends Serializable {
static VariantBuilder newBuilder() {
throw new UnsupportedOperationException();
}
}
|
apache/paimon | 1,150 | paimon-api/src/main/java/org/apache/paimon/options/description/DescriptionElement.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.options.description;
/** Part of a {@link Description} that can be converted into String representation. */
interface DescriptionElement {
/**
* Transforms itself into String representation using given format.
*
* @param formatter formatter to use.
*/
void format(Formatter formatter);
}
|
apache/phoenix | 1,124 | phoenix-core-client/src/main/java/org/apache/phoenix/coprocessorclient/tasks/IndexRebuildTaskConstants.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.coprocessorclient.tasks;
public class IndexRebuildTaskConstants {
public static final String INDEX_NAME = "IndexName";
public static final String JOB_ID = "JobID";
public static final String DISABLE_BEFORE = "DisableBefore";
public static final String REBUILD_ALL = "RebuildAll";
}
|
apache/pig | 1,160 | test/e2e/pig/udfs/java/org/apache/pig/test/udf/storefunc/DumpLoaderBad.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.pig.test.udf.storefunc;
// This is a loader for data produced by DumpStore.
// Line format: (field1, field2, ... fieldn)\n
public class DumpLoaderBad extends DumpLoader {
// this class is only used in negative tests
// just based on DumpLoader so we don't need to provide any other special
// implementation here
}
|
apache/pinot | 1,104 | pinot-plugins/pinot-metrics/pinot-dropwizard/src/test/java/org/apache/pinot/plugin/metrics/dropwizard/DropwizardMetricNameTest.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.plugin.metrics.dropwizard;
import nl.jqno.equalsverifier.EqualsVerifier;
import org.testng.annotations.Test;
public class DropwizardMetricNameTest {
@Test
public void testEqualsContract() {
EqualsVerifier.forClass(DropwizardMetricName.class).verify();
}
}
|
apache/plc4x | 1,134 | plc4j/spi/src/test/java/org/apache/plc4x/java/spi/configuration/config/ParameterConverterType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.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.spi.configuration.config;
public class ParameterConverterType {
private final String convertedType;
public ParameterConverterType(String convertedType) {
this.convertedType = convertedType;
}
public String getConvertedType() {
return convertedType;
}
}
|
apache/polygene-java | 1,146 | core/api/src/main/java/org/apache/polygene/api/service/qualifier/Qualifier.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.api.service.qualifier;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* Annotation used to declare Qualifiers annotations.
*/
@Retention( RetentionPolicy.RUNTIME )
public @interface Qualifier
{
Class<? extends AnnotationQualifier> value();
}
|
apache/pulsar | 1,128 | pulsar-metadata/src/main/java/org/apache/pulsar/metadata/api/coordination/LeaderElectionState.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.pulsar.metadata.api.coordination;
/**
* State of the leader election.
*/
public enum LeaderElectionState {
/**
* No leader has been elected yet.
*/
NoLeader,
/**
* We are currently the leader.
*/
Leading,
/**
* Follower state.
*/
Following
}
|
apache/qpid-jms | 1,132 | qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/netty/NettyWssTransportFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.qpid.jms.transports.netty;
/**
* Creates a Netty based Secure WebSocket transport.
*/
public class NettyWssTransportFactory extends NettyWsTransportFactory {
@Override
public String getName() {
return "WSS";
}
@Override
public boolean isSecure() {
return true;
}
}
|
apache/reef | 1,163 | lang/java/reef-common/src/main/java/org/apache/reef/util/Builder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.reef.util;
/**
* A basic Builder pattern interface.
*
* @param <T> The type of object to be built.
*/
public interface Builder<T> {
/**
* Builds a fresh instance of the object. This can be invoked several times,
* each of which return a new instance.
*
* @return a fresh instance of the object.
*/
T build();
}
|
apache/roller | 1,156 | app/src/main/java/org/apache/roller/planet/business/PlanetProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. The ASF licenses this file to You
* under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License. For additional information regarding
* copyright in this work, please see the NOTICE file in the top level
* directory of this distribution.
*/
package org.apache.roller.planet.business;
/**
* Provides access to a Planet instance.
*/
public interface PlanetProvider {
/**
* Trigger bootstrapping.
*/
void bootstrap() throws BootstrapException;
/**
* Get a Planet instance.
*/
Planet getWeblogger();
}
|
apache/royale-compiler | 1,138 | royale-maven-plugin/src/main/java/org/apache/royale/maven/BaseCompileMojo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.royale.maven;
import org.apache.flex.tools.FlexTool;
/**
*/
public abstract class BaseCompileMojo extends BaseMojo {
@Override
protected String getToolGroupName() {
return "Royale";
}
@Override
protected String getFlexTool() {
return FlexTool.FLEX_TOOL_COMPC;
}
}
|
apache/royale-compiler | 1,141 | compiler-jx/src/main/java/org/apache/royale/compiler/codegen/js/IJSDocEmitter.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.royale.compiler.codegen.js;
import org.apache.royale.compiler.codegen.IDocEmitter;
/**
* The {@link IJSDocEmitter} interface allows the abstraction of JavaScript
* document comments to be emitted per tag.
*
* @author Michael Schmalle
*/
public interface IJSDocEmitter extends IDocEmitter
{
}
|
apache/seatunnel | 1,149 | seatunnel-api/src/main/java/org/apache/seatunnel/api/table/factory/CatalogFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.api.table.factory;
import org.apache.seatunnel.api.configuration.ReadonlyConfig;
import org.apache.seatunnel.api.table.catalog.Catalog;
public interface CatalogFactory extends Factory {
/** Creates a {@link Catalog} using the options. */
Catalog createCatalog(String catalogName, ReadonlyConfig options);
}
|
apache/servicecomb-java-chassis | 1,106 | demo/demo-pojo/pojo-client/src/main/java/org/apache/servicecomb/demo/pojo/client/ClientInterfaceForServerTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.demo.pojo.client;
import org.apache.servicecomb.demo.server.TestRequest;
import org.apache.servicecomb.demo.server.User;
public interface ClientInterfaceForServerTest {
User splitParam(int nameNotIndex, User user);
User wrapParam(TestRequest nameNotRequest);
}
|
apache/servicecomb-samples | 1,140 | bmi/calculator/src/main/java/org/apache/servicecomb/samples/CalculatorEndpoint.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.samples;
/**
* {@link CalculatorEndpoint} provides the common interface for different endpoint implementations.
* It needs to be declared as public.
*/
public interface CalculatorEndpoint {
/**
* Calculate the BMI(Body Mass Index).
*/
BMIViewObject calculate(double height, double weight);
}
|
apache/shardingsphere | 1,111 | infra/merge/src/test/java/org/apache/shardingsphere/infra/merge/result/impl/stream/fixture/TestStreamMergedResult.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.infra.merge.result.impl.stream.fixture;
import org.apache.shardingsphere.infra.merge.result.impl.stream.StreamMergedResult;
public final class TestStreamMergedResult extends StreamMergedResult {
@Override
public boolean next() {
return false;
}
}
|
apache/shardingsphere | 1,126 | features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/rule/ShadowDataSourceRule.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.shadow.rule;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
* Shadow data source rule.
*/
@RequiredArgsConstructor
@Getter
public final class ShadowDataSourceRule {
private final String productionDataSource;
private final String shadowDataSource;
}
|
apache/shindig | 1,154 | java/gadgets/src/main/java/org/apache/shindig/gadgets/render/ServiceFetcher.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.shindig.gadgets.render;
import com.google.common.collect.Multimap;
import com.google.inject.ImplementedBy;
/**
* Retrieves the rpc services for a container.
*/
@ImplementedBy(DefaultServiceFetcher.class)
public interface ServiceFetcher {
Multimap<String, String> getServicesForContainer(String container, String host);
}
|
apache/skywalking-java | 1,097 | apm-sniffer/apm-sdk-plugin/elasticsearch-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v5/Util.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.plugin.elasticsearch.v5;
import static org.apache.skywalking.apm.util.StringUtil.isEmpty;
class Util {
static String wrapperNullStringValue(String value) {
if (isEmpty(value)) {
return "";
}
return value;
}
}
|
apache/skywalking-java | 1,116 | apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/ids/PropagatedTraceId.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.agent.core.context.ids;
/**
* The <code>PropagatedTraceId</code> represents a {@link DistributedTraceId}, which is propagated from the peer.
*/
public class PropagatedTraceId extends DistributedTraceId {
public PropagatedTraceId(String id) {
super(id);
}
}
|
apache/skywalking | 1,090 | oap-server/server-configuration/configuration-etcd/src/main/java/org/apache/skywalking/oap/server/configuration/etcd/EtcdConfigException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.configuration.etcd;
/**
* exception type throw by Etcd Configuration.
*/
public class EtcdConfigException extends RuntimeException {
public EtcdConfigException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/skywalking | 1,128 | oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/oal/rt/CoreOALDefine.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.oal.rt;
public class CoreOALDefine extends OALDefine {
public static final CoreOALDefine INSTANCE = new CoreOALDefine();
private CoreOALDefine() {
super(
"oal/core.oal",
"org.apache.skywalking.oap.server.core.source"
);
}
}
|
apache/storm | 1,151 | examples/storm-perf/src/main/java/org/apache/storm/perf/queuetest/MyThread.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.perf.queuetest;
abstract class MyThread extends Thread {
public long count = 0;
public long runTime = 0;
MyThread(String thdName) {
super(thdName);
}
public long throughput() {
return getCount() / (runTime / 1000);
}
public long getCount() {
return count;
}
}
|
apache/storm | 1,151 | storm-client/src/jvm/org/apache/storm/trident/operation/impl/IndexHashBatchToPartition.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version
* 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.operation.impl;
import org.apache.storm.trident.partition.IndexHashGrouping;
public class IndexHashBatchToPartition implements SingleEmitAggregator.BatchToPartition {
@Override
public int partitionIndex(Object batchId, int numPartitions) {
return IndexHashGrouping.objectToIndex(batchId, numPartitions);
}
}
|
apache/storm | 1,162 | external/storm-jdbc/src/main/java/org/apache/storm/jdbc/mapper/JdbcMapper.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version
* 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.jdbc.mapper;
import java.io.Serializable;
import java.util.List;
import org.apache.storm.jdbc.common.Column;
import org.apache.storm.tuple.ITuple;
public interface JdbcMapper extends Serializable {
/**
* Get columns.
* @return list of columns that represents one row in a DB table.
*/
List<Column> getColumns(ITuple tuple);
}
|
apache/streampipes | 1,120 | streampipes-storage-management/src/main/java/org/apache/streampipes/storage/management/StorageDispatcher.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.streampipes.storage.management;
import org.apache.streampipes.storage.api.INoSqlStorage;
import org.apache.streampipes.storage.couchdb.CouchDbStorageManager;
public enum StorageDispatcher {
INSTANCE;
public INoSqlStorage getNoSqlStore() {
return CouchDbStorageManager.INSTANCE;
}
}
|
apache/synapse | 1,143 | modules/samples/services/SecureStockQuoteService/src/samples/services/GetQuote.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package samples.services;
public class GetQuote {
String symbol;
public GetQuote() {
}
public GetQuote(String symbol) {
this.symbol = symbol;
}
public String getSymbol() {
return symbol;
}
public void setSymbol(String symbol) {
this.symbol = symbol;
}
}
|
apache/synapse | 1,143 | modules/samples/services/SimpleStockQuoteService/src/samples/services/GetQuote.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package samples.services;
public class GetQuote {
String symbol;
public GetQuote() {
}
public GetQuote(String symbol) {
this.symbol = symbol;
}
public String getSymbol() {
return symbol;
}
public void setSymbol(String symbol) {
this.symbol = symbol;
}
}
|
apache/syncope | 1,125 | core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/SyncopeResultHandler.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.pushpull;
import org.apache.syncope.core.persistence.api.entity.task.ProvisioningTask;
public interface SyncopeResultHandler<T extends ProvisioningTask<?>, A extends ProvisioningActions> {
void setProfile(ProvisioningProfile<T, A> profile);
void stop();
}
|
apache/syncope | 1,126 | core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/keymaster/DomainEntity.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.syncope.core.persistence.api.entity.keymaster;
import org.apache.syncope.common.keymaster.client.api.model.Domain;
import org.apache.syncope.core.persistence.api.entity.ProvidedKeyEntity;
public interface DomainEntity extends ProvidedKeyEntity {
Domain get();
void set(Domain domain);
}
|
apache/tapestry-5 | 1,136 | tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/Inner.java | // Copyright 2007 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.integration.app1.components;
import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.MarkupWriter;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.ioc.annotations.Inject;
public class Inner
{
@Parameter
private String innerValue;
@Inject
private ComponentResources resources;
void beginRender(MarkupWriter writer)
{
writer.writef("[ value: %s, bound: %s ]", innerValue, resources.isBound("innerValue"));
}
}
|
apache/tapestry-5 | 1,137 | tapestry-core/src/main/java/org/apache/tapestry5/internal/services/UrlAsset.java | // Copyright 2014 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.internal.services;
import org.apache.tapestry5.commons.Resource;
public class UrlAsset extends AbstractAsset
{
final private String url;
final private Resource resource;
public UrlAsset(String url, Resource resource)
{
super(true);
this.url = url;
this.resource = resource;
}
@Override
public String toClientURL()
{
return url;
}
@Override
public Resource getResource()
{
return resource;
}
}
|
apache/tapestry-5 | 1,154 | plastic/src/main/java/org/apache/tapestry5/plastic/PropertyAccessType.java | // Copyright 2011 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.plastic;
/**
* Used when converting a field into a property (that is, adding accessor methods for the field) to identify
* which method(s) to create (a getter to access the value and/or a mutator to modify the value).
*
* @see PlasticField#createAccessors(PropertyAccessType, String)
*/
public enum PropertyAccessType
{
/** Create just a getter, not a mutator. */
READ_ONLY,
/** Create just a mutator, not a getter. */
WRITE_ONLY,
/** Create both a mutator and a getter. */
READ_WRITE;
}
|
apache/tez | 1,157 | tez-mapreduce/src/main/java/org/apache/hadoop/mapred/split/SplitSizeEstimator.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.mapred.split;
import java.io.IOException;
import org.apache.hadoop.mapred.InputSplit;
/* the two big differences between the mapred.* and mapreduce.* split classes
* is that mapreduce throws InterruptedExceptions */
public interface SplitSizeEstimator {
long getEstimatedSize(InputSplit split) throws IOException;
}
|
apache/tinkerpop | 1,141 | gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/Writing.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.tinkerpop.gremlin.process.traversal.step;
import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event;
/**
* A marker interface for steps that writes the graph data.
*
* @author Phanindhra (https://github.com/phanindhra876)
*/
public interface Writing<E extends Event> extends Mutating<E> {
}
|
apache/tomcat | 1,194 | java/jakarta/websocket/PongMessage.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package jakarta.websocket;
import java.nio.ByteBuffer;
/**
* Represents a WebSocket Pong message and used by message handlers to enable applications to process the response to
* any Pings they send.
*/
public interface PongMessage {
/**
* Get the payload of the Pong message.
*
* @return The payload of the Pong message.
*/
ByteBuffer getApplicationData();
}
|
apache/tomcat80 | 1,195 | java/javax/annotation/Priority.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @since Common Annotations 1.2
*/
@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Priority {
int value();
}
|
apache/tomee | 1,092 | arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/LittleFinderHome.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.bmp.local;
import jakarta.ejb.EJBLocalHome;
import java.rmi.RemoteException;
import java.util.Collection;
public interface LittleFinderHome extends EJBLocalHome {
Collection<LittleFinder> findAll() throws Exception, RemoteException;
}
|
apache/tomee | 1,133 | tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/realm/event/BaseAuthenticationEvent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tomee.catalina.realm.event;
import java.security.Principal;
public abstract class BaseAuthenticationEvent {
private Principal principal;
public Principal getPrincipal() {
return principal;
}
public void setPrincipal(Principal principal) {
this.principal = principal;
}
}
|
apache/tomee | 1,137 | server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/config/WSS4JOutInterceptorFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.server.cxf.config;
import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
/**
* @version $Rev$ $Date$
*/
public class WSS4JOutInterceptorFactory extends WSS4JInterceptorFactoryBase {
public WSS4JOutInterceptor create() {
return new WSS4JOutInterceptor(getAndDestroyMap());
}
}
|
apache/tomee | 1,146 | container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/CmrFieldInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.assembler.classic;
public class CmrFieldInfo extends InfoObject {
public EntityBeanInfo roleSource;
public String roleName;
public String fieldName;
public String fieldType;
public boolean cascadeDelete;
public boolean many;
public CmrFieldInfo mappedBy;
public boolean synthetic;
}
|
apache/tomee | 1,157 | container/openejb-core/src/main/java/org/apache/openejb/testing/Descriptors.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.openejb.testing;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Descriptors {
Descriptor[] value() default {};
}
|
apache/tomee | 1,158 | container/openejb-core/src/main/java/org/apache/openejb/junit/MockInjector.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.openejb.junit;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Deprecated // use org.apache.openejb.testing.MockInjector
public @interface MockInjector {
}
|
apache/unomi | 1,134 | tools/shell-commands/src/main/java/org/apache/unomi/shell/migration/utils/HttpRequestException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.unomi.shell.migration.utils;
import java.io.IOException;
public class HttpRequestException extends IOException {
private int code;
public HttpRequestException(String message, int code) {
super(message);
this.code = code;
}
public int getCode() {
return code;
}
}
|
apache/wicket | 1,131 | wicket-core-tests/src/test/java/org/apache/wicket/markup/html/internal/MyBorder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup.html.internal;
import org.apache.wicket.markup.html.border.Border;
/**
*
* @author Juergen Donnerstag
*/
public class MyBorder extends Border
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*
* @param id
*/
public MyBorder(String id)
{
super(id);
}
}
|
apache/wicket | 1,153 | wicket-native-websocket/wicket-native-websocket-javax/src/main/java/module-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module org.apache.wicket.websocket.javax {
requires org.apache.wicket.util;
requires org.apache.wicket.request;
requires org.apache.wicket.core;
requires org.apache.wicket.websocket.core;
requires static jakarta.servlet;
requires jakarta.websocket;
requires org.slf4j;
exports org.apache.wicket.protocol.ws.javax;
}
|
apache/xmlgraphics-fop | 1,147 | fop-core/src/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* $Id$ */
package org.apache.fop.layoutengine;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
/**
* JUnit test suit for running layout engine test under JUnit control.
*/
@RunWith(Suite.class)
@SuiteClasses(LayoutEngineTestCase.class)
public class LayoutEngineTestSuite {
}
|
google/android-classyshark | 1,131 | ClassySharkWS/src/com/google/classyshark/silverghost/plugins/IdentityMapper.java | /*
* Copyright 2016 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.silverghost.plugins;
import com.google.classyshark.silverghost.TokensMapper;
import java.io.File;
import java.util.Map;
import java.util.TreeMap;
public class IdentityMapper implements TokensMapper {
private Map<String, String> identityMap = new TreeMap<>();
public IdentityMapper() {
}
@Override
public TokensMapper readMappings(File file) {
return this;
}
@Override
public Map<String, String> getReverseClasses() {
return this.identityMap;
}
}
|
google/archive-patcher | 1,129 | generator/src/test/java/com/google/archivepatcher/generator/bsdiff/DivSuffixSorterTest.java | // Copyright 2016 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.archivepatcher.generator.bsdiff;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@RunWith(JUnit4.class)
public class DivSuffixSorterTest extends SuffixSorterTestBase {
DivSuffixSorter divSuffixSorter;
@Before
public void setup() {
divSuffixSorter =
new DivSuffixSorter(new RandomAccessObjectFactory.RandomAccessByteArrayObjectFactory());
}
@Override
public SuffixSorter getSuffixSorter() {
return divSuffixSorter;
}
}
|
google/binnavi | 1,133 | src/main/java/com/google/security/zynamics/binnavi/Gui/IdbSelection/CPreviousDirectoriesBox.java | // Copyright 2011-2016 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.security.zynamics.binnavi.Gui.IdbSelection;
import java.util.List;
import javax.swing.JComboBox;
/**
* Combo box for showing a list of directories.
*/
public final class CPreviousDirectoriesBox extends JComboBox<String> {
/**
* Creates a new combo box object.
*
* @param previousDirectories Contains the data shown in the combo box.
*/
public CPreviousDirectoriesBox(final List<String> previousDirectories) {
for (final String directory : previousDirectories) {
addItem(directory);
}
}
}
|
google/copybara | 1,169 | java/com/google/copybara/approval/NoneApprovedProvider.java | /*
* Copyright (C) 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.copybara.approval;
import com.google.common.collect.ImmutableList;
import com.google.copybara.util.console.Console;
import java.util.Collection;
import java.util.function.Function;
/** An approval provider that return all the changes as not approved */
public class NoneApprovedProvider implements ApprovalsProvider {
@Override
public ApprovalsResult computeApprovals(
ImmutableList<ChangeWithApprovals> changes,
Function<String, Collection<String>> labelFinder,
Console console) {
return new ApprovalsResult(changes);
}
}
|
google/gapid | 1,170 | gapic/src/main/com/google/gapid/util/LoggingCallback.java | /*
* Copyright (C) 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.gapid.util;
import com.google.common.util.concurrent.FutureCallback;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* {@link FutureCallback} implementation that simply logs errors, but otherwise ignores them.
*/
public abstract class LoggingCallback<T> implements FutureCallback<T> {
private final Logger log;
public LoggingCallback(Logger log) {
this.log = log;
}
@Override
public void onFailure(Throwable t) {
log.log(Level.WARNING, "Unexpected and unhandled exception in async processing.", t);
}
}
|
google/graphicsfuzz | 1,148 | ast/src/main/java/com/graphicsfuzz/common/glslversion/Essl320.java | /*
* Copyright 2019 The GraphicsFuzz Project 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.graphicsfuzz.common.glslversion;
final class Essl320 extends CompositeShadingLanguageVersion {
static final ShadingLanguageVersion INSTANCE = new Essl320(Essl310.INSTANCE);
private Essl320(ShadingLanguageVersion prototype) {
super(prototype);
// Singleton
}
@Override
public String getVersionString() {
return "320 es";
}
@Override
public boolean supportedInterpolationFunctions() {
return true;
}
@Override
public boolean supportedPushConstants() {
return true;
}
}
|
google/graphicsfuzz | 1,154 | ast/src/main/java/com/graphicsfuzz/common/ast/stmt/DoStmt.java | /*
* Copyright 2018 The GraphicsFuzz Project 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.graphicsfuzz.common.ast.stmt;
import com.graphicsfuzz.common.ast.expr.Expr;
import com.graphicsfuzz.common.ast.visitors.IAstVisitor;
public class DoStmt extends LoopStmt {
public DoStmt(Stmt body, Expr condition) {
super(condition, body);
}
@Override
public boolean hasCondition() {
return true;
}
@Override
public void accept(IAstVisitor visitor) {
visitor.visitDoStmt(this);
}
@Override
public DoStmt clone() {
return new DoStmt(getBody().clone(), getCondition().clone());
}
}
|
google/j2cl | 1,175 | jre/java/javaemul/internal/ArrayIterator.java | /*
* Copyright 2024 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 javaemul.internal;
import static javaemul.internal.InternalPreconditions.checkElement;
import java.util.Iterator;
/** An iterator for an array. */
public final class ArrayIterator<T> implements Iterator<T> {
private final T[] array;
private int i;
public ArrayIterator(T[] array) {
this.array = array;
}
@Override
public boolean hasNext() {
return i < array.length;
}
@Override
public T next() {
checkElement(hasNext());
return array[i++];
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
}
|
google/libaddressinput | 1,149 | common/src/main/java/com/google/i18n/addressinput/common/AddressAutocompleteApi.java | package com.google.i18n.addressinput.common;
import com.google.common.util.concurrent.FutureCallback;
import java.util.List;
/**
* AddressAutocompleteApi encapsulates the functionality required to fetch address autocomplete
* suggestions for an unstructured address query string entered by the user.
*
* An implementation using GMSCore is provided under
* libaddressinput/android/src/main.java/com/android/i18n/addressinput/autocomplete/gmscore.
*/
public interface AddressAutocompleteApi {
/**
* Returns true if the AddressAutocompleteApi is properly configured to fetch autocomplete
* predictions. This allows the caller to enable autocomplete only if the AddressAutocompleteApi
* is properly configured (e.g. the user has granted all the necessary permissions).
*/
boolean isConfiguredCorrectly();
/**
* Given an unstructured address query, getAutocompletePredictions fetches autocomplete
* suggestions for the intended address and provides these suggestions via the callback.
*/
void getAutocompletePredictions(
String query, FutureCallback<List<? extends AddressAutocompletePrediction>> callback);
}
|
google/nomulus | 1,139 | core/src/main/java/google/registry/model/domain/fee11/FeeTransferResponseExtensionV11.java | // Copyright 2017 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.model.domain.fee11;
import google.registry.model.domain.fee.FeeTransformResponseExtension;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlType;
/**
* An XML data object that represents a fee extension that may be present on the response to EPP
* domain transfer requests.
*/
@XmlRootElement(name = "trnData")
@XmlType(propOrder = {"currency", "fees", "credits"})
public class FeeTransferResponseExtensionV11 extends FeeTransformResponseExtension {}
|
google/nomulus | 1,139 | core/src/main/java/google/registry/model/domain/fee12/FeeTransferResponseExtensionV12.java | // Copyright 2017 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.model.domain.fee12;
import google.registry.model.domain.fee.FeeTransformResponseExtension;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlType;
/**
* An XML data object that represents a fee extension that may be present on the response to EPP
* domain transfer requests.
*/
@XmlRootElement(name = "trnData")
@XmlType(propOrder = {"currency", "fees", "credits"})
public class FeeTransferResponseExtensionV12 extends FeeTransformResponseExtension {}
|
google/nomulus | 1,149 | core/src/main/java/google/registry/model/domain/launch/LaunchInfoExtension.java | // Copyright 2017 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.model.domain.launch;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlRootElement;
/**
* An XML data object that represents a launch extension that may be present on EPP domain info
* commands.
*/
@XmlRootElement(name = "info")
public class LaunchInfoExtension extends LaunchExtension {
/** Whether or not to include mark information in the response. */
@XmlAttribute
Boolean includeMark;
public Boolean getIncludeMark() {
return includeMark;
}
}
|
google/nomulus | 1,157 | core/src/main/java/google/registry/model/domain/bulktoken/package-info.java | // Copyright 2022 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
@XmlSchema(
namespace = "urn:google:params:xml:ns:bulkToken-1.0",
xmlns = @XmlNs(prefix = "bulkToken", namespaceURI = "urn:google:params:xml:ns:bulkToken-1.0"),
elementFormDefault = XmlNsForm.QUALIFIED)
@XmlAccessorType(XmlAccessType.FIELD)
package google.registry.model.domain.bulktoken;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlNs;
import jakarta.xml.bind.annotation.XmlNsForm;
import jakarta.xml.bind.annotation.XmlSchema;
|
google/nomulus | 1,157 | core/src/main/java/google/registry/model/domain/superuser/package-info.java | // Copyright 2017 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
@XmlSchema(
namespace = "urn:google:params:xml:ns:superuser-1.0",
xmlns = @XmlNs(prefix = "superuser", namespaceURI = "urn:google:params:xml:ns:superuser-1.0"),
elementFormDefault = XmlNsForm.QUALIFIED)
@XmlAccessorType(XmlAccessType.FIELD)
package google.registry.model.domain.superuser;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlNs;
import jakarta.xml.bind.annotation.XmlNsForm;
import jakarta.xml.bind.annotation.XmlSchema;
|
google/nomulus | 1,158 | core/src/main/java/google/registry/reporting/spec11/RegistrarThreatMatches.java | // Copyright 2018 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.reporting.spec11;
import com.google.common.collect.ImmutableList;
import google.registry.beam.spec11.ThreatMatch;
import java.util.List;
/** Value record representing the registrar and list-of-threat-matches pair stored in GCS. */
public record RegistrarThreatMatches(String clientId, ImmutableList<ThreatMatch> threatMatches) {
static RegistrarThreatMatches create(String clientId, List<ThreatMatch> threatMatches) {
return new RegistrarThreatMatches(clientId, ImmutableList.copyOf(threatMatches));
}
}
|
google/nomulus | 1,170 | util/src/main/java/google/registry/util/JavaCharMatchers.java | // Copyright 2019 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.util;
import com.google.common.base.CharMatcher;
/**
* Creates {@link CharMatcher CharMatchers} that support Java character strings only, not unicode
* supplementary characters.
*/
public class JavaCharMatchers {
/** Returns a {@link CharMatcher} that matcher only ASCII letters and digits. */
public static CharMatcher asciiLetterOrDigitMatcher() {
return CharMatcher.inRange('0', '9')
.or(CharMatcher.inRange('a', 'z'))
.or(CharMatcher.inRange('A', 'Z'));
}
private JavaCharMatchers() {}
}
|
google/TestParameterInjector | 1,124 | junit5/src/main/java/com/google/testing/junit/testparameterinjector/junit5/TestParameterValues.java | /*
* Copyright 2021 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.testing.junit.testparameterinjector.junit5;
import com.google.common.base.Optional;
import java.lang.annotation.Annotation;
/** Interface to retrieve the {@link TestParameterAnnotation} values for a test. */
interface TestParameterValues {
/**
* Returns a {@link TestParameterAnnotation} value for the current test as specified by {@code
* testInfo}, or {@link Optional#absent()} if the {@code annotationType} is not found.
*/
Optional<Object> getValue(Class<? extends Annotation> annotationType);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.