repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/wicket | 1,110 | wicket-core-tests/src/test/java/org/apache/wicket/markup/html/form/border/CommonBorder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.form.border;
import org.apache.wicket.markup.html.border.Border;
/**
*
*/
public class CommonBorder extends Border
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*
* @param id
*/
public CommonBorder(String id)
{
super(id);
}
}
|
apache/wicket | 1,125 | wicket-core-tests/src/test/java/org/apache/wicket/properties/TestPanel.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.properties;
import org.apache.wicket.markup.html.panel.Panel;
/**
*
* @author Juergen Donnerstag
*/
public class TestPanel extends Panel
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*
* @param id
*/
public TestPanel(final String id)
{
super(id);
}
}
|
apache/wicket | 1,126 | wicket-core-tests/src/test/java/org/apache/wicket/properties/TestForm.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.properties;
import org.apache.wicket.markup.html.form.Form;
/**
*
* @author Juergen Donnerstag
*/
public class TestForm extends Form<Void>
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*
* @param id
*/
public TestForm(final String id)
{
super(id);
}
}
|
apache/xmlgraphics-fop | 1,136 | fop-core/src/test/java/org/apache/fop/render/pdf/RenderPDFTestSuite.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT 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.render.pdf;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
/**
* A test suite for org.apache.fop.render.pdf.*
*/
@RunWith(Suite.class)
@SuiteClasses(PDFRendererConfigParserTestCase.class)
public final class RenderPDFTestSuite {
}
|
google-research/project-guideline | 1,096 | project_guideline/android/java/com/google/research/guideline/engine/GuidelineNativeEngineModule.java | // Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.research.guideline.engine;
import androidx.fragment.app.Fragment;
import com.google.research.guideline.inject.Qualifiers.GuidanceFragment;
import dagger.Module;
import dagger.Provides;
import dagger.hilt.InstallIn;
import dagger.hilt.components.SingletonComponent;
@Module
@InstallIn(SingletonComponent.class)
interface GuidelineNativeEngineModule {
@Provides
@GuidanceFragment
static Fragment provideGuidelineNativeEngineFragment() {
return new NativeEngineFragment();
}
}
|
google/cel-java | 1,139 | common/src/main/java/dev/cel/common/values/BaseProtoMessageValueProvider.java | // Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package dev.cel.common.values;
import com.google.errorprone.annotations.Immutable;
import dev.cel.common.annotations.Internal;
/**
* {@code BaseProtoMessageValueProvider} is a common parent to {@code ProtoMessageValueProvider} and
* {@code ProtoMessageLiteValueProvider}.
*
* <p>CEL-Java internals. Do not use. Use one of the inherited variants mentioned above.
*/
@Internal
@Immutable
public abstract class BaseProtoMessageValueProvider implements CelValueProvider {
public abstract BaseProtoCelValueConverter protoCelValueConverter();
}
|
google/filament | 1,112 | android/filamat-android/src/main/java/com/google/android/filament/filamat/MaterialPackage.java | /*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.filament.filamat;
import androidx.annotation.NonNull;
import java.nio.ByteBuffer;
public class MaterialPackage {
private final ByteBuffer mBuffer;
private final boolean mIsValid;
MaterialPackage(@NonNull ByteBuffer buffer, boolean isValid) {
mBuffer = buffer;
mIsValid = isValid;
}
@NonNull
public ByteBuffer getBuffer() {
return mBuffer;
}
public boolean isValid() {
return mIsValid;
}
}
|
google/guava | 1,133 | android/guava-testlib/src/com/google/common/collect/testing/DerivedComparable.java | /*
* Copyright (C) 2010 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.common.collect.testing;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
/**
* Simple derived class to verify that we handle generics correctly.
*
* @author Kevin Bourrillion
*/
@GwtCompatible
public class DerivedComparable extends BaseComparable {
public DerivedComparable(String s) {
super(s);
}
@GwtIncompatible @J2ktIncompatible private static final long serialVersionUID = 0;
}
|
google/guice | 1,135 | core/src/com/google/inject/internal/ModuleAnnotatedMethodScannerProcessor.java | /*
* Copyright (C) 2015 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.inject.internal;
import com.google.inject.spi.ModuleAnnotatedMethodScannerBinding;
/**
* Handles {@code Binder.scanModulesForAnnotatedMethods} commands.
*
* @author sameb@google.com (Sam Berlin)
*/
final class ModuleAnnotatedMethodScannerProcessor extends AbstractProcessor {
ModuleAnnotatedMethodScannerProcessor(Errors errors) {
super(errors);
}
@Override
public Boolean visit(ModuleAnnotatedMethodScannerBinding command) {
injector.getBindingData().addScanner(command);
return true;
}
}
|
google/j2cl | 1,126 | transpiler/javatests/com/google/j2cl/readable/java/importglobaljstypes/RegExp.java | /*
* Copyright 2023 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 importglobaljstypes;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
final class RegExp {
public static void test() {
NativeRegExp regExp = new NativeRegExp("teststring");
regExp.test("restString");
String str = regExp.toString();
}
@JsType(isNative = true, name = "RegExp", namespace = JsPackage.GLOBAL)
public static class NativeRegExp {
public NativeRegExp(String pattern) {}
public native boolean test(String value);
public native String toString();
}
}
|
google/j2objc | 1,122 | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringTransform.java | /* GENERATED SOURCE. DO NOT MODIFY. */
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html#License
/*
*******************************************************************************
* Copyright (C) 1996-2009, Google, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
package android.icu.text;
/**
* Provide a base class for Transforms that focuses just on the transformation of the text. APIs that take Transliterator, but only depend on the text transformation should use this interface in the API instead.
*
* @author markdavis
* @hide Only a subset of ICU is exposed in Android
*
*/
public interface StringTransform extends Transform<String,String> {
/**
* Transform the text in some way, to be determined by the subclass.
* @param source text to be transformed (eg lowercased)
* @return result
*/
@Override
public String transform(String source);
} |
google/j2objc | 1,123 | jre_emul/android/platform/libcore/luni/src/test/java/libcore/java/time/LocalDateTest.java | /*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package libcore.java.time;
import org.junit.Test;
import java.time.LocalDate;
import java.time.chrono.IsoChronology;
import static org.junit.Assert.assertSame;
/**
* Additional tests for {@link LocalDate}.
*
* @see tck.java.time.TCKLocalDate
* @see test.java.time.TestLocalDate
*/
public class LocalDateTest {
@Test
public void test_getChronology() {
// LocalDate always uses the IsoChronology.
assertSame(IsoChronology.INSTANCE, LocalDate.MIN.getChronology());
}
}
|
google/nomulus | 1,152 | core/src/main/java/google/registry/dns/writer/DnsWritersModule.java | // Copyright 2025 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.dns.writer;
import dagger.Module;
import google.registry.dns.writer.clouddns.CloudDnsWriterModule;
import google.registry.dns.writer.dnsupdate.DnsUpdateWriterModule;
/**
* Groups all {@link DnsWriter} implementations to be installed.
*
* <p>To cherry-pick the DNS writers to install, overwrite this file with your private version in
* the release process.
*/
@Module(
includes = {CloudDnsWriterModule.class, DnsUpdateWriterModule.class, VoidDnsWriterModule.class})
public class DnsWritersModule {}
|
google/tsunami-security-scanner-plugins | 1,024 | community/detectors/apache_solr_arbitrary_file_reading/src/main/java/com/google/tsunami/plugins/detectors/solr/ApacheSolrArbitraryFileReadingDetectorBootstrapModule.java | /*
* Copyright 2021 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.tsunami.plugins.detectors.solr;
import com.google.tsunami.plugin.PluginBootstrapModule;
/**
* A {@link PluginBootstrapModule} for {@link ApacheSolrArbitraryFileReadingDetector}
*/
public final class ApacheSolrArbitraryFileReadingDetectorBootstrapModule extends
PluginBootstrapModule {
@Override
protected void configurePlugin() {
registerPlugin(ApacheSolrArbitraryFileReadingDetector.class);
}
}
|
googleapis/api-compiler | 1,130 | src/main/java/com/google/api/tools/framework/tools/ModelBuildOverrides.java | /*
* Copyright (C) 2016 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.api.tools.framework.tools;
import com.google.api.tools.framework.model.Model;
import com.google.protobuf.ExtensionRegistry;
/** Overridable settings for model generation. */
public interface ModelBuildOverrides {
/** Registers processors used for model building */
abstract void registerProcessors(Model model);
/** Registers aspects used for model building */
abstract void registerAspects(Model model);
abstract boolean includeDiscovery();
abstract ExtensionRegistry getPlatformExtensions();
}
|
googleapis/google-cloud-java | 1,034 | java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1alpha/src/main/java/com/google/shopping/merchant/reports/v1alpha/RelativeDemandChangeTypeOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/shopping/merchant/reports/v1alpha/reports.proto
// Protobuf Java Version: 3.25.8
package com.google.shopping.merchant.reports.v1alpha;
public interface RelativeDemandChangeTypeOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.shopping.merchant.reports.v1alpha.RelativeDemandChangeType)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,044 | java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1beta1/src/main/java/com/google/recaptchaenterprise/v1beta1/AnnotateAssessmentResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto
// Protobuf Java Version: 3.25.8
package com.google.recaptchaenterprise.v1beta1;
public interface AnnotateAssessmentResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/java-genai | 1,132 | src/main/java/com/google/genai/errors/ExcludeFromGeneratedCoverageReport.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.genai.errors;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Annotation to exclude a method or constructor from the Jacoco coverage report.
*
* <p>Jacoco will exclude methods that have an annotation with the word "generated" in it.
*/
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE})
@interface ExcludeFromGeneratedCoverageReport {} |
googleapis/java-genai | 1,132 | src/main/java/com/google/genai/types/ExcludeFromGeneratedCoverageReport.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.genai.types;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Annotation to exclude a method or constructor from the Jacoco coverage report.
*
* <p>Jacoco will exclude methods that have an annotation with the word "generated" in it.
*/
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE})
@interface ExcludeFromGeneratedCoverageReport {}
|
googlearchive/gwt-google-apis | 1,140 | maps/maps/src/com/google/gwt/maps/jsio/client/Global.java | /*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.gwt.maps.jsio.client;
import com.google.gwt.maps.jsio.client.impl.MetaDataName;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
/**
* This annotation is used on a JSWrapper class in a manner similar to
* {@link Constructor} although the value is interpreted as a value reference
* rather than a function.
*/
@Documented
@MetaDataName("gwt.global")
@Target(value = {ElementType.METHOD, ElementType.TYPE})
public @interface Global {
String value();
}
|
hibernate/hibernate-demos | 1,128 | java9/custom-jlink-plugin/example-b/src/main/java/com/example/b/Main.java | /*
* License: Apache License, Version 2.0
* See the LICENSE file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
*/
package com.example.b;
import java.io.InputStream;
import java.util.List;
import org.jboss.jandex.AnnotationInstance;
import org.jboss.jandex.DotName;
import org.jboss.jandex.Index;
import org.jboss.jandex.IndexReader;
/**
* A consumer of the Jandex index. We simply print out all types annotated with {@code @Entity}.
*
* @author Gunnar Morling
*/
public class Main {
public static void main(String[] args) throws Exception {
try (InputStream input = Main.class.getResourceAsStream( "/META-INF/jandex.idx" ) ) {
IndexReader reader = new IndexReader( input );
Index index = reader.read();
List<AnnotationInstance> entityInstances = index.getAnnotations(
DotName.createSimple( "com.example.a.Entity" )
);
for (AnnotationInstance annotationInstance : entityInstances) {
System.out.println( annotationInstance.target().asClass().name() );
}
}
}
}
|
hibernate/hibernate-orm | 1,041 | hibernate-core/src/test/java/org/hibernate/orm/test/jpa/callbacks/hbmxml/MappingClassMoreThanOnceTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.jpa.callbacks.hbmxml;
import jakarta.persistence.EntityManagerFactory;
import org.hibernate.testing.orm.junit.JiraKey;
import org.hibernate.testing.orm.junit.EntityManagerFactoryScope;
import org.hibernate.testing.orm.junit.Jpa;
import org.junit.jupiter.api.Test;
/**
* @author Felix Feisst (feisst dot felix at gmail dot com)
*/
@Jpa(
xmlMappings = "org/hibernate/orm/test/jpa/callbacks/hbmxml/ClassMappedMoreThanOnce.hbm.xml"
)
public class MappingClassMoreThanOnceTest {
/**
* Tests that an entity manager can be created when a class is mapped more than once.
*/
@Test
@JiraKey(value = "HHH-8775")
public void testBootstrapWithClassMappedMOreThanOnce(EntityManagerFactoryScope scope) {
EntityManagerFactory emf = null;
try {
emf = scope.getEntityManagerFactory();
}
finally {
if ( emf != null ) {
try {
emf.close();
}
catch (Exception ignore) {
}
}
}
}
}
|
hibernate/hibernate-orm | 1,041 | hibernate-core/src/test/java/org/hibernate/orm/test/legacy/Eye.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.legacy;
import java.util.HashSet;
import java.util.Set;
/**
* @author Gavin King
*/
public class Eye {
private long id;
private String name;
private Jay jay;
private Set jays = new HashSet();
/**
* @return Returns the id.
*/
public long getId() {
return id;
}
/**
* @param id The id to set.
*/
public void setId(long id) {
this.id = id;
}
/**
* @return Returns the jay.
*/
public Jay getJay() {
return jay;
}
/**
* @param jay The jay to set.
*/
public void setJay(Jay jay) {
this.jay = jay;
}
/**
* @return Returns the jays.
*/
public Set getJays() {
return jays;
}
/**
* @param jays The jays to set.
*/
public void setJays(Set jays) {
this.jays = jays;
}
/**
* @return Returns the name.
*/
public String getName() {
return name;
}
/**
* @param name The name to set.
*/
public void setName(String name) {
this.name = name;
}
}
|
hibernate/hibernate-orm | 1,045 | hibernate-core/src/test/java/org/hibernate/orm/test/collection/list/Parent.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.collection.list;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import jakarta.persistence.Id;
public class Parent {
private Integer id;
private String name;
private List<Child> children = new ArrayList<>();
public Parent() {
}
public Parent(Integer id, String name) {
this.id = id;
this.name = name;
}
@Id
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<Child> getChildren() {
return children;
}
public void setChildren(List<Child> children) {
this.children = children;
for ( Iterator<Child> i = children.iterator(); i.hasNext(); ) {
if ( i.next() == null ) {
i.remove();
}
}
}
public void addChild(Child child) {
this.children.add( child );
child.setParent( this );
}
}
|
hibernate/hibernate-orm | 1,075 | hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/EmbeddedJpaAnnotation.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.models.spi.ModelsContext;
import jakarta.persistence.Embedded;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class EmbeddedJpaAnnotation implements Embedded {
/**
* Used in creating dynamic annotation instances (e.g. from XML)
*/
public EmbeddedJpaAnnotation(ModelsContext modelContext) {
}
/**
* Used in creating annotation instances from JDK variant
*/
public EmbeddedJpaAnnotation(Embedded annotation, ModelsContext modelContext) {
}
/**
* Used in creating annotation instances from Jandex variant
*/
public EmbeddedJpaAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) {
}
@Override
public Class<? extends Annotation> annotationType() {
return Embedded.class;
}
}
|
hibernate/hibernate-orm | 1,075 | hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/PostLoadJpaAnnotation.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.models.spi.ModelsContext;
import jakarta.persistence.PostLoad;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class PostLoadJpaAnnotation implements PostLoad {
/**
* Used in creating dynamic annotation instances (e.g. from XML)
*/
public PostLoadJpaAnnotation(ModelsContext modelContext) {
}
/**
* Used in creating annotation instances from JDK variant
*/
public PostLoadJpaAnnotation(PostLoad annotation, ModelsContext modelContext) {
}
/**
* Used in creating annotation instances from Jandex variant
*/
public PostLoadJpaAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) {
}
@Override
public Class<? extends Annotation> annotationType() {
return PostLoad.class;
}
}
|
hibernate/hibernate-search | 1,049 | mapper/pojo-base/src/main/java/org/hibernate/search/mapper/pojo/bridge/builtin/spatial/impl/LongitudeMarker.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.mapper.pojo.bridge.builtin.spatial.impl;
import org.hibernate.search.mapper.pojo.bridge.binding.MarkerBindingContext;
import org.hibernate.search.mapper.pojo.bridge.builtin.programmatic.GeoPointBinder;
import org.hibernate.search.mapper.pojo.bridge.builtin.programmatic.LatitudeLongitudeMarkerBinder;
public class LongitudeMarker {
private final String markerSet;
/**
* Private constructor, use {@link GeoPointBinder#longitude()} instead.
*/
private LongitudeMarker(String markerSet) {
this.markerSet = markerSet;
}
public String getMarkerSet() {
return markerSet;
}
public static class Binder implements LatitudeLongitudeMarkerBinder {
private String markerSet;
@Override
public Binder markerSet(String markerSet) {
this.markerSet = markerSet;
return this;
}
@Override
public void bind(MarkerBindingContext context) {
context.marker( new LongitudeMarker( markerSet ) );
}
}
}
|
hibernate/hibernate-search | 1,061 | backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/gson/impl/JsonObjectAccessorImpl.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.backend.elasticsearch.gson.impl;
import org.hibernate.search.util.common.impl.Contracts;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
/**
* A {@link JsonAccessor} that ensures the accessed object is a {@link JsonObject}.
*
*/
public class JsonObjectAccessorImpl extends AbstractTypingJsonAccessor<JsonObject>
implements JsonObjectAccessor, JsonCompositeAccessor<JsonObject> {
public JsonObjectAccessorImpl(JsonAccessor<JsonElement> parent) {
super( parent );
}
@Override
protected JsonElementType<JsonObject> getExpectedElementType() {
return JsonElementTypes.OBJECT;
}
@Override
public JsonObject getOrCreate(JsonObject root) {
return getOrCreate( root, JsonObject::new );
}
@Override
public UnknownTypeJsonAccessor property(String propertyName) {
Contracts.assertNotNullNorEmpty( propertyName, "propertyName" );
return new ObjectPropertyJsonAccessor( this, propertyName );
}
}
|
hibernate/hibernate-validator | 1,057 | engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/bv/money/MaxValidatorForMonetaryAmount.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.validator.internal.constraintvalidators.bv.money;
import java.math.BigDecimal;
import javax.money.MonetaryAmount;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
import jakarta.validation.constraints.Max;
/**
* Check that the monetary amount being validated is less than or equal to the maximum
* value specified.
*
* @author Lukas Niemeier
* @author Willi Schönborn
*/
public class MaxValidatorForMonetaryAmount implements ConstraintValidator<Max, MonetaryAmount> {
private BigDecimal maxValue;
@Override
public void initialize(Max maxValue) {
this.maxValue = BigDecimal.valueOf( maxValue.value() );
}
@Override
public boolean isValid(MonetaryAmount value, ConstraintValidatorContext context) {
// null values are valid
if ( value == null ) {
return true;
}
return value.getNumber().numberValueExact( BigDecimal.class ).compareTo( maxValue ) <= 0;
}
}
|
openjdk/jdk8 | 1,155 | langtools/test/tools/javac/diags/examples/IllegalLineEndInCharLit.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.illegal.line.end.in.char.lit
class IllegalLineEndInCharLit {
char c = '
';
}
|
openjdk/jdk8 | 1,163 | jdk/test/java/lang/instrument/PremainClass/NoPremainAgent.java | /*
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.lang.instrument.*;
class NoPremainAgent {
// This agent is missing the premain() function.
}
|
openjdk/jdk8 | 1,165 | langtools/test/tools/javac/staticImport/6665223/pkg/A.java | /*
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
import static pkg.B.b;
class A {
public static void main(String[] args) {
b();
}
}
|
openjdk/jdk8 | 1,166 | langtools/test/tools/javac/QualifiedAccess/pack1/P2.java | /*
* Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* Support class for QualifiedAccess tests.
*/
package pack1;
class P2 {
public int privatei = 0;
}
|
openjdk/jtreg | 1,166 | test/modlibs/buildAction/usermods/BuildUserModClasses.java | /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @build
* um2/module-info um2/um2_p1.um2_p1_B
* um3/module-info um3/um3_p1.um3_p1_B
*/
|
openjdk/skara | 1,187 | metrics/src/main/java/module-info.java | /*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
module org.openjdk.skara.metrics {
requires java.management;
requires jdk.management;
exports org.openjdk.skara.metrics;
}
|
oracle-quickstart/oci-cloudnative | 1,106 | src/orders/src/main/java/mushop/orders/controllers/HealthCheckController.java | /**
** Copyright © 2020, Oracle and/or its affiliates. All rights reserved.
** Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
**/
package mushop.orders.controllers;
import mushop.orders.entities.HealthCheck;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import java.util.*;
@RestController
public class HealthCheckController {
@ResponseStatus(HttpStatus.OK)
@RequestMapping(method = RequestMethod.GET, path = "/health")
public
@ResponseBody
Map<String, List<HealthCheck>> getHealth() {
Map<String, List<HealthCheck>> map = new HashMap<String, List<HealthCheck>>();
List<HealthCheck> healthChecks = new ArrayList<HealthCheck>();
Date dateNow = Calendar.getInstance().getTime();
HealthCheck app = new HealthCheck("orders", "OK", dateNow);
HealthCheck database = new HealthCheck("orders-db", "OK", dateNow);
healthChecks.add(app);
healthChecks.add(database);
map.put("health", healthChecks);
return map;
}
}
|
apache/commons-math | 1,117 | commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/function/package-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
*
* <p>
* The {@code function} package contains function objects that wrap the
* methods contained in {@link java.lang.Math}, as well as common
* mathematical functions such as the gaussian and sinc functions.
* </p>
*
*/
package org.apache.commons.math4.legacy.analysis.function;
|
apache/cxf | 1,097 | distribution/src/main/release/samples/jax_rs/tracing_opentelemetry/src/main/java/demo/jaxrs/tracing/GoogleBooksApi.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package demo.jaxrs.tracing;
import feign.Headers;
import feign.Param;
import feign.RequestLine;
import feign.Response;
public interface GoogleBooksApi {
@RequestLine("GET /books/v1/volumes?q={q}")
@Headers("Accept: application/json")
Response search(@Param("q") String query);
}
|
apache/cxf | 1,135 | services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/NotificationBrokerMBean.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.wsn;
import java.util.List;
public interface NotificationBrokerMBean extends EndpointMBean {
List<String> getPublisher();
List<String> getSubscriptions();
EndpointMBean getPublisher(String name);
EndpointMBean getSubscription(String name);
EndpointMBean getAnonymousPublisher();
}
|
apache/datafu | 1,138 | datafu-hourglass/src/test/java/datafu/hourglass/test/jobs/counting/CountWriter.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package datafu.hourglass.test.jobs.counting;
import java.io.IOException;
import org.apache.avro.generic.GenericRecord;
public interface CountWriter
{
public void count(GenericRecord key) throws IOException, InterruptedException;
public void count(GenericRecord key, long count) throws IOException, InterruptedException;
} |
apache/directory-server | 1,113 | protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/package-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
/**
* Provides LDAP 'Extended' operations that implement
* {@link org.apache.directory.server.ldap.ExtendedOperationHandler}.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
package org.apache.directory.server.ldap.handlers.extended;
|
apache/dolphinscheduler | 1,103 | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/exception/FileOperateException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.exception;
public class FileOperateException extends BaseException {
public FileOperateException(String message) {
super(message);
}
public FileOperateException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/drill | 1,131 | exec/java-exec/src/main/java/org/apache/drill/exec/planner/cost/DrillRelOptCostFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.drill.exec.planner.cost;
import org.apache.calcite.plan.RelOptCost;
import org.apache.calcite.plan.RelOptCostFactory;
public interface DrillRelOptCostFactory extends RelOptCostFactory {
/**
* Creates a cost object.
*/
RelOptCost makeCost(double rowCount, double cpu, double io, double network);
}
|
apache/drill | 1,136 | exec/vector/src/main/java/org/apache/drill/exec/vector/accessor/DictReader.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.drill.exec.vector.accessor;
public interface DictReader extends ArrayReader {
KeyAccessor keyAccessor();
ObjectReader valueReader();
/**
* Number of entries in the dict.
* @return the number of entries
*/
@Override
int size();
ValueType keyColumnType();
ObjectType valueColumnType();
}
|
apache/druid | 1,124 | server/src/main/java/org/apache/druid/server/coordinator/balancer/CostBalancerStrategyFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.druid.server.coordinator.balancer;
public class CostBalancerStrategyFactory extends BalancerStrategyFactory
{
@Override
public CostBalancerStrategy createBalancerStrategy(int numBalancerThreads)
{
return new CostBalancerStrategy(getOrCreateBalancerExecutor(numBalancerThreads));
}
}
|
apache/dubbo | 1,141 | dubbo-common/src/main/java/org/apache/dubbo/common/deploy/ModuleDeployListener.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.deploy;
import org.apache.dubbo.common.extension.ExtensionScope;
import org.apache.dubbo.common.extension.SPI;
import org.apache.dubbo.rpc.model.ModuleModel;
/**
* Module deploy listener
*/
@SPI(scope = ExtensionScope.MODULE)
public interface ModuleDeployListener extends DeployListener<ModuleModel> {}
|
apache/eventmesh | 1,114 | eventmesh-common/src/main/java/org/apache/eventmesh/common/remote/request/ReportHeartBeatRequest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.common.remote.request;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class ReportHeartBeatRequest extends BaseRemoteRequest {
private String address;
private String reportedTimeStamp;
private String jobID;
}
|
apache/eventmesh | 1,129 | eventmesh-common/src/main/java/org/apache/eventmesh/common/remote/exception/ErrorCode.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.common.remote.exception;
public class ErrorCode {
public static final int SUCCESS = 0;
public static final int BAD_REQUEST = 4001;
public static final int BAD_DB_DATA = 4002;
public static final int INTERNAL_ERR = 5000;
public static final int STARTUP_CONFIG_MISS = 5001;
}
|
apache/fineract | 1,099 | fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleGeneratorFactory.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.portfolio.loanaccount.loanschedule.domain;
import org.apache.fineract.portfolio.loanproduct.domain.InterestMethod;
public interface LoanScheduleGeneratorFactory {
LoanScheduleGenerator create(LoanScheduleType loanScheduleType, InterestMethod interestMethod);
}
|
apache/fineract | 1,100 | fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReplayedTransactionBusinessEventService.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.portfolio.loanaccount.service;
import org.apache.fineract.portfolio.loanaccount.domain.ChangedTransactionDetail;
public interface ReplayedTransactionBusinessEventService {
void raiseTransactionReplayedEvents(ChangedTransactionDetail changedTransactionDetail);
}
|
apache/fineract | 1,110 | fineract-provider/src/main/java/org/apache/fineract/cob/exceptions/LoanAccountWasAlreadyLockedOrProcessed.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.cob.exceptions;
public class LoanAccountWasAlreadyLockedOrProcessed extends Exception {
public LoanAccountWasAlreadyLockedOrProcessed(Long loanId) {
super(String.format("Loan is in already locked state, or has been already processed! loanId: %d", loanId));
}
}
|
apache/fineract | 1,122 | fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/MDCWrapper.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.infrastructure.core.service;
import org.slf4j.MDC;
import org.springframework.stereotype.Component;
@Component
public class MDCWrapper {
public void put(String key, String val) {
MDC.put(key, val);
}
public void remove(String key) {
MDC.remove(key);
}
}
|
apache/fineract | 1,127 | fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeRepository.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.portfolio.charge.domain;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
public interface ChargeRepository extends JpaRepository<Charge, Long>, JpaSpecificationExecutor<Charge> {
// no added behaviour
}
|
apache/flex-utilities | 1,113 | FlexPMD/flex-pmd-java/flex-pmd-files/src/test/java/com/adobe/ac/pmd/ResourcesManagerTestTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.adobe.ac.pmd;
import junit.framework.Assert;
import org.junit.Test;
public class ResourcesManagerTestTest
{
@Test
public void testGetInstance()
{
final ResourcesManagerTest manager = ResourcesManagerTest.getInstance();
Assert.assertNotNull( manager.getTestFiles() );
}
}
|
apache/flink-statefun | 1,115 | statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/di/Inject.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.statefun.flink.core.di;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.CONSTRUCTOR)
public @interface Inject {}
|
apache/geaflow | 1,100 | geaflow-console/app/core/model/src/main/java/org/apache/geaflow/console/core/model/security/resource/TenantResource.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.geaflow.console.core.model.security.resource;
import org.apache.geaflow.console.common.util.type.GeaflowResourceType;
public class TenantResource extends AtomResource {
public TenantResource(String id) {
super(id, GeaflowResourceType.TENANT, null);
}
}
|
apache/geaflow | 1,109 | geaflow-console/app/biz/shared/src/main/java/org/apache/geaflow/console/biz/shared/convert/DataViewConverter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.geaflow.console.biz.shared.convert;
import org.apache.geaflow.console.biz.shared.view.DataView;
import org.apache.geaflow.console.core.model.data.GeaflowData;
public abstract class DataViewConverter<M extends GeaflowData, V extends DataView> extends NameViewConverter<M, V> {
}
|
apache/gobblin | 1,102 | gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanSuccess.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.gobblin.service.modules.orchestration;
/**
* A successful status for {@link AzkabanClient}.
*/
public class AzkabanSuccess extends AzkabanClientStatus<String> {
public AzkabanSuccess() {
this("");
}
public AzkabanSuccess(String response) {
super(response);
}
}
|
apache/gobblin | 1,117 | gobblin-core/src/main/java/org/apache/gobblin/qualitychecker/row/RowLevelPolicyCheckerBuilderFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.gobblin.qualitychecker.row;
import org.apache.gobblin.configuration.State;
public class RowLevelPolicyCheckerBuilderFactory {
public static RowLevelPolicyCheckerBuilder newPolicyCheckerBuilder(State state, int index) {
return RowLevelPolicyCheckerBuilder.newBuilder(state, index);
}
}
|
apache/gobblin | 1,140 | gobblin-runtime/src/main/java/org/apache/gobblin/runtime/PoolBasedLimiter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.gobblin.runtime;
/**
* {@inheritDoc}
*
* @deprecated This class has been moved to {@link org.apache.gobblin.util.limiter.PoolBasedLimiter}.
*/
@Deprecated
public class PoolBasedLimiter extends org.apache.gobblin.util.limiter.PoolBasedLimiter {
public PoolBasedLimiter(int poolSize) {
super(poolSize);
}
}
|
apache/gravitino | 1,162 | api/src/main/java/org/apache/gravitino/Auditable.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino;
import org.apache.gravitino.annotation.Evolving;
/**
* An auditable entity is an entity that has audit information associated with it. This audit
* information is used to track changes to the entity.
*/
@Evolving
public interface Auditable {
/** @return The audit information of the entity. */
Audit auditInfo();
}
|
apache/groovy | 1,152 | src/test/groovy/org/codehaus/groovy/classgen/ConstructorTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.codehaus.groovy.classgen;
import groovy.lang.GroovyObject;
public class ConstructorTest extends TestSupport {
public void testConstructor() throws Exception {
GroovyObject object = compile("src/test/groovy/groovy/NewExpressionTest.groovy");
object.invokeMethod("testNewInstance", null);
}
}
|
apache/hadoop-common | 1,047 | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/package-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@InterfaceAudience.Private
@InterfaceStability.Unstable
package org.apache.hadoop.yarn.server.resourcemanager.recovery;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
|
apache/harmony | 1,124 | classlib/modules/swing/src/main/java/common/javax/swing/plaf/ComponentInputMapUIResource.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @author Sergey Burlak
*/
package javax.swing.plaf;
import javax.swing.ComponentInputMap;
import javax.swing.JComponent;
public class ComponentInputMapUIResource extends ComponentInputMap implements UIResource {
public ComponentInputMapUIResource(final JComponent c) {
super(c);
}
}
|
apache/harmony | 1,128 | classlib/modules/awt/src/main/java/common/org/apache/harmony/awt/ContextThreadGroup.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @author Pavel Dolgov
*/
package org.apache.harmony.awt;
public class ContextThreadGroup extends ThreadGroup {
final ContextStorage context = new ContextStorage();
public ContextThreadGroup(String name) {
super(name);
}
public void dispose() {
context.shutdown();
}
}
|
apache/hive | 1,109 | jdbc-handler/src/main/java/org/apache/hive/storage/jdbc/exception/HiveJdbcDatabaseAccessException.java | /*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hive.storage.jdbc.exception;
public class HiveJdbcDatabaseAccessException extends HiveJdbcStorageException {
private static final long serialVersionUID = -4106595742876276803L;
public HiveJdbcDatabaseAccessException() {
super();
}
public HiveJdbcDatabaseAccessException(String message, Throwable cause) {
super(message, cause);
}
public HiveJdbcDatabaseAccessException(String message) {
super(message);
}
public HiveJdbcDatabaseAccessException(Throwable cause) {
super(cause);
}
}
|
apache/hive | 1,111 | standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStoreTestHook.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.hive.metastore;
public abstract class ObjectStoreTestHook {
public static ObjectStoreTestHook instance = null;
public abstract void scheduledQueryPoll();
static void onScheduledQueryPoll() {
if (instance != null) {
instance.scheduledQueryPoll();
}
}
}
|
apache/hive | 1,129 | ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/MapJoinTableContainerDirectAccess.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.hive.ql.exec.persistence;
import java.io.IOException;
import org.apache.hadoop.hive.serde2.SerDeException;
import org.apache.hadoop.io.Writable;
public interface MapJoinTableContainerDirectAccess {
void put(Writable currentKey, Writable currentValue) throws SerDeException, IOException;
} |
apache/hive | 1,145 | ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedExpressions.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.hive.ql.exec.vector;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression;
@Retention(RetentionPolicy.RUNTIME)
public @interface VectorizedExpressions {
Class<? extends VectorExpression>[] value();
}
|
apache/hudi | 1,135 | hudi-common/src/main/java/org/apache/hudi/common/serialization/CustomSerializer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hudi.common.serialization;
import java.io.IOException;
import java.io.Serializable;
/**
* Allows custom serialization for spillable map values.
* @param <T>
*/
public interface CustomSerializer<T> extends Serializable {
byte[] serialize(T input) throws IOException;
T deserialize(byte[] bytes);
}
|
apache/hudi | 1,135 | hudi-common/src/main/java/org/apache/hudi/exception/HoodieValidationException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hudi.exception;
/**
* <p>
* Exception thrown for validation failures.
* </p>
*/
public class HoodieValidationException extends HoodieException {
public HoodieValidationException(String msg, Throwable t) {
super(msg, t);
}
public HoodieValidationException(String msg) {
super(msg);
}
}
|
apache/iceberg | 1,150 | core/src/main/java/org/apache/iceberg/deletes/DeleteCounter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iceberg.deletes;
/** A counter to be used to count deletes as they are applied. */
public class DeleteCounter {
private long count = 0L;
/** Increment the counter by one. */
public void increment() {
count++;
}
/** Return the current value of the counter. */
public long get() {
return count;
}
}
|
apache/ignite-3 | 1,119 | modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ScannableDataSource.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.sql.engine.exec;
import java.util.concurrent.Flow.Publisher;
import org.apache.ignite.internal.lang.InternalTuple;
/**
* Provides read operations over an abstract data source.
*/
@FunctionalInterface
public interface ScannableDataSource {
Publisher<InternalTuple> scan();
}
|
apache/ignite | 1,111 | modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2IndexType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.ignite.internal.processors.query.h2.database;
/**
* Type of supported indexed types.
*/
public enum H2IndexType {
/** Hash index type. */
HASH,
/** Btree index type. */
BTREE,
/** Scan index type. */
SCAN,
/** Geo Spatial index type. */
SPATIAL
}
|
apache/ignite | 1,117 | modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutAllTxOffHeapBenchmark.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.yardstick.cache;
import org.apache.ignite.IgniteCache;
/**
*
*/
public class IgnitePutAllTxOffHeapBenchmark extends IgnitePutAllTxBenchmark {
/** {@inheritDoc} */
@Override protected IgniteCache<Integer, Object> cache() {
return ignite().cache("tx-offheap");
}
}
|
apache/impala | 1,149 | fe/src/main/java/org/apache/impala/authentication/saml/AuthTokenGenerator.java | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.impala.authentication.saml;
// copy of https://github.com/vihangk1/hive/blob/master_saml/service/src/java/org/apache/hive/service/auth/saml/AuthTokenGenerator.java
public interface AuthTokenGenerator {
String get(String username, String relayStateId);
String validate(String token) throws HttpSamlAuthenticationException;
} |
apache/incubator-brooklyn | 1,091 | brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/sharding/MongoDBShardCluster.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.brooklyn.entity.nosql.mongodb.sharding;
import org.apache.brooklyn.api.entity.ImplementedBy;
import org.apache.brooklyn.entity.group.DynamicCluster;
@ImplementedBy(MongoDBShardClusterImpl.class)
public interface MongoDBShardCluster extends DynamicCluster {
}
|
apache/incubator-datalab | 1,111 | services/datalab-model/src/main/java/com/epam/datalab/dto/imagemetadata/ApplicationDto.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES 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.epam.datalab.dto.imagemetadata;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ApplicationDto {
@JsonProperty("Version")
private String version;
@JsonProperty("Name")
private String name;
}
|
apache/incubator-heron | 1,149 | heron/api/src/java/org/apache/heron/api/spout/IRichSpout.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.heron.api.spout;
import org.apache.heron.api.topology.IComponent;
/**
* When writing topologies using Java, {@link org.apache.heron.api.bolt.IRichBolt} and
* {@link IRichSpout} are the main interfaces
* to use to implement components of the topology.
*/
public interface IRichSpout extends ISpout, IComponent {
}
|
apache/incubator-hugegraph | 1,106 | hugegraph-store/hg-store-test/src/main/java/org/apache/hugegraph/store/common/CommonSuiteTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hugegraph.store.common;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import lombok.extern.slf4j.Slf4j;
@RunWith(Suite.class)
@Suite.SuiteClasses({
ByteBufferAllocatorTest.class,
KVByteBufferTest.class
})
@Slf4j
public class CommonSuiteTest {
}
|
apache/incubator-kie-drools | 1,102 | drools-drl/drools-drl-extensions/src/main/java/org/drools/drl/extensions/GuidedRuleTemplateProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.drools.drl.extensions;
import java.io.IOException;
import java.io.InputStream;
import org.kie.api.internal.utils.KieService;
public interface GuidedRuleTemplateProvider extends KieService {
ResourceConversionResult loadFromInputStream(InputStream is) throws IOException;
}
|
apache/incubator-kie-drools | 1,123 | drools-model/drools-canonical-model/src/main/java/org/drools/model/Query1Def.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.drools.model;
import org.drools.model.view.QueryCallViewItem;
public interface Query1Def<T1> extends QueryDef {
default QueryCallViewItem call(Argument<T1> var1) {
return call(true, var1);
}
QueryCallViewItem call(boolean open, Argument<T1> var1);
Variable<T1> getArg1();
}
|
apache/incubator-kie-drools | 1,135 | drools-traits/src/main/java/org/drools/traits/core/metadata/Don.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.drools.traits.core.metadata;
import org.drools.traits.core.factmodel.AbstractTraitFactory;
public interface Don<K,T> extends WorkingMemoryTask<T> {
public K getCore();
public Class<T> getTrait();
public Don<K,T> setTraitFactory( AbstractTraitFactory factory );
public Modify getInitArgs();
}
|
apache/incubator-kie-kogito-runtimes | 1,069 | quarkus/addons/jbpm-usertask-storage-jpa/runtime/src/test/java/org/jbpm/usertask/jpa/quarkus/PostgreSQLQuarkusTestProfile.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jbpm.usertask.jpa.quarkus;
import io.quarkus.test.junit.QuarkusTestProfile;
public class PostgreSQLQuarkusTestProfile implements QuarkusTestProfile {
@Override
public String getConfigProfile() {
return "test-postgresql";
}
}
|
apache/incubator-kie-kogito-runtimes | 1,107 | jbpm/jbpm-flow/src/main/java/org/jbpm/process/core/validation/ProcessValidationError.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jbpm.process.core.validation;
import org.kie.api.definition.process.Process;
import org.kie.kogito.process.validation.ValidationError;
/**
* Represents a RuleFlow validation error.
*
*/
public interface ProcessValidationError extends ValidationError {
Process getProcess();
}
|
apache/incubator-kie-optaplanner | 1,082 | core/optaplanner-core-impl/src/main/java/org/optaplanner/core/impl/domain/variable/listener/support/EntityNotification.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.optaplanner.core.impl.domain.variable.listener.support;
import org.optaplanner.core.api.domain.variable.AbstractVariableListener;
public interface EntityNotification<Solution_> extends Notification<Solution_, AbstractVariableListener<Solution_, Object>> {
}
|
apache/incubator-livy | 1,154 | api/src/main/java/org/apache/livy/annotations/Private.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.livy.annotations;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* Indicates an API that is considered private to Livy and should not be used by client
* applications.
*/
@Documented
@Retention(RetentionPolicy.CLASS)
public @interface Private { }
|
apache/incubator-retired-wave | 1,123 | wave/src/main/java/org/waveprotocol/wave/model/document/operation/SuperSink.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.waveprotocol.wave.model.document.operation;
import org.waveprotocol.wave.model.document.operation.DocOp.IsDocOp;
/**
* Sinks everything and provides a DocInitialization.
*
* @author anorth@google.com (Alex North)
*/
public interface SuperSink extends ModifiableDocument, NindoSink, IsDocOp {
}
|
apache/incubator-xtable | 1,121 | xtable-api/src/main/java/org/apache/xtable/model/validation/ValidationResult.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.xtable.model.validation;
import java.time.Instant;
import lombok.Builder;
import lombok.Value;
/**
* Result of a validation check
*
* @since 0.1
*/
@Value
@Builder
public class ValidationResult {
Instant instant;
ValidationCheck check;
boolean isSuccess;
String errorMessage;
}
|
apache/iotdb | 1,070 | iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/batch/utils/ChunkWriterFlushCallback.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.executor.batch.utils;
import org.apache.tsfile.write.chunk.IChunkWriter;
@FunctionalInterface
public interface ChunkWriterFlushCallback {
void call(IChunkWriter chunkWriter);
}
|
apache/iotdb | 1,104 | iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/exception/WALRecoverException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iotdb.db.storageengine.dataregion.wal.exception;
public class WALRecoverException extends WALException {
public WALRecoverException(Throwable cause) {
super(cause);
}
public WALRecoverException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/jackrabbit-oak | 1,130 | oak-benchmarks/src/main/java/org/apache/jackrabbit/oak/run/ScalabilityCommand.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jackrabbit.oak.run;
import org.apache.jackrabbit.oak.run.commons.Command;
import org.apache.jackrabbit.oak.scalability.ScalabilityRunner;
class ScalabilityCommand implements Command {
@Override
public void execute(String... args) throws Exception {
ScalabilityRunner.main(args);
}
}
|
apache/jena | 1,132 | jena-geosparql/src/main/java/org/apache/jena/geosparql/configuration/SrsException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.geosparql.configuration;
/**
*
*
*/
public class SrsException extends RuntimeException {
private static final long serialVersionUID = 1L;
public SrsException(String msg) {
super(msg);
}
public SrsException(String msg, Throwable cause) {
super(msg, cause);
}
}
|
apache/kafka | 1,093 | streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBTimeOrderedWindowSchemaWithoutIndexSegmentedBytesStoreTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.streams.state.internals;
public class RocksDBTimeOrderedWindowSchemaWithoutIndexSegmentedBytesStoreTest extends AbstractDualSchemaRocksDBSegmentedBytesStoreTest {
@Override
SchemaType schemaType() {
return SchemaType.WindowSchemaWithoutIndex;
}
}
|
apache/karaf | 1,102 | examples/karaf-scr-example/karaf-scr-example-api/src/main/java/org/apache/karaf/examples/scr/api/BookingService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.karaf.examples.scr.api;
import java.util.Collection;
/**
* Simple interface describing the booking service.
*/
public interface BookingService {
Collection<Booking> list();
Booking get(Long id);
void add(Booking booking);
void remove(Long id);
}
|
apache/kylin | 1,127 | src/core-common/src/main/java/org/apache/kylin/common/exception/OutOfMaxCombinationException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kylin.common.exception;
import org.apache.kylin.common.exception.code.ErrorCodeProducer;
public class OutOfMaxCombinationException extends KylinException {
public OutOfMaxCombinationException(ErrorCodeProducer errorCodeProducer, Object... args) {
super(errorCodeProducer, args);
}
}
|
apache/kylin | 1,133 | src/query-service/src/main/java/org/apache/kylin/rest/request/QueryDetectRequest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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 lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class QueryDetectRequest {
private String sql;
private String project;
private Integer offset = 0;
private Integer limit = 500;
}
|
apache/lens | 1,152 | lens-cube/src/main/java/org/apache/lens/cube/parse/TimeRangeWriter.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.cube.parse;
import java.util.Set;
import org.apache.lens.cube.metadata.FactPartition;
import org.apache.lens.server.api.error.LensException;
public interface TimeRangeWriter {
String getTimeRangeWhereClause(CubeQueryContext cubeQueryContext, String tableName, Set<FactPartition> parts)
throws LensException;
}
|
apache/logging-log4j2 | 1,118 | log4j-core-test/src/test/java/org/apache/logging/log4j/core/util/UnexpectedFormatException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to you under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.core.util;
public class UnexpectedFormatException extends Exception {
/**
* Generated serial version ID.
*/
private static final long serialVersionUID = -5322323184538975579L;
public UnexpectedFormatException(final String msg) {
super(msg);
}
}
|
apache/manifoldcf | 1,123 | connectors/documentum/build-stub/src/main/java/com/documentum/fc/client/IDfCollection.java | /* $Id$ */
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.documentum.fc.client;
import com.documentum.fc.common.*;
/** Stub interface to allow the connector to build fully.
*/
public interface IDfCollection
{
public String getString(String attribute)
throws DfException;
public boolean next()
throws DfException;
public void close()
throws DfException;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.