repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
hibernate/hibernate-ogm
1,082
infinispan-remote/src/main/java/org/hibernate/ogm/datastore/infinispanremote/options/navigation/impl/InfinispanRemoteGlobalContextImpl.java
/* * Hibernate OGM, Domain model persistence for NoSQL datastores * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.ogm.datastore.infinispanremote.options.navigation.impl; import org.hibernate.ogm.datastore.infinispanremote.options.navigation.InfinispanRemoteEntityContext; import org.hibernate.ogm.datastore.infinispanremote.options.navigation.InfinispanRemoteGlobalContext; import org.hibernate.ogm.datastore.keyvalue.options.navigation.spi.BaseKeyValueStoreGlobalContext; import org.hibernate.ogm.options.navigation.spi.ConfigurationContext; /** * Converts global Infinispan Remote options. * * @author Gunnar Morling */ public abstract class InfinispanRemoteGlobalContextImpl extends BaseKeyValueStoreGlobalContext<InfinispanRemoteGlobalContext, InfinispanRemoteEntityContext> implements InfinispanRemoteGlobalContext { public InfinispanRemoteGlobalContextImpl(ConfigurationContext context) { super( context ); } }
hibernate/hibernate-orm
1,054
hibernate-core/src/test/java/org/hibernate/orm/test/unionsubclass/Location.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.unionsubclass; import java.util.ArrayList; import java.util.Collection; /** * @author Gavin King */ public class Location { private long id; private String name; private Collection beings = new ArrayList(); Location() {} public Location(String name) { this.name = name; } public void addBeing(Being b) { b.setLocation(this); beings.add(b); } /** * @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 name. */ public String getName() { return name; } /** * @param name The name to set. */ public void setName(String name) { this.name = name; } /** * @return Returns the beings. */ public Collection getBeings() { return beings; } /** * @param beings The beings to set. */ public void setBeings(Collection beings) { this.beings = beings; } }
hibernate/hibernate-orm
1,083
hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/PreRemoveJpaAnnotation.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.PreRemove; @SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" }) @jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor") public class PreRemoveJpaAnnotation implements PreRemove { /** * Used in creating dynamic annotation instances (e.g. from XML) */ public PreRemoveJpaAnnotation(ModelsContext modelContext) { } /** * Used in creating annotation instances from JDK variant */ public PreRemoveJpaAnnotation(PreRemove annotation, ModelsContext modelContext) { } /** * Used in creating annotation instances from Jandex variant */ public PreRemoveJpaAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) { } @Override public Class<? extends Annotation> annotationType() { return PreRemove.class; } }
hibernate/hibernate-orm
1,106
hibernate-core/src/main/java/org/hibernate/type/descriptor/jdbc/InstantJdbcType.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.type.descriptor.jdbc; import java.time.Instant; import org.hibernate.type.SqlTypes; import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.jdbc.internal.AbstractJavaTimeJdbcType; import org.hibernate.type.descriptor.jdbc.internal.JdbcLiteralFormatterTemporal; import jakarta.persistence.TemporalType; /** * Descriptor for handling {@linkplain Instant} directly through the JDBC driver * * @author Steve Ebersole */ public class InstantJdbcType extends AbstractJavaTimeJdbcType<Instant> { public static final InstantJdbcType INSTANCE = new InstantJdbcType(); public InstantJdbcType() { super( Instant.class ); } @Override public int getJdbcTypeCode() { return SqlTypes.INSTANT; } @Override public int getDdlTypeCode() { return SqlTypes.TIMESTAMP; } @Override public <T> JdbcLiteralFormatter<T> getJdbcLiteralFormatter(JavaType<T> javaType) { return new JdbcLiteralFormatterTemporal<>( javaType, TemporalType.TIMESTAMP ); } }
hibernate/hibernate-orm
1,116
hibernate-core/src/main/java/org/hibernate/query/sqm/tree/select/SqmAliasedNode.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.query.sqm.tree.select; import org.hibernate.query.sqm.SqmBindableType; import org.hibernate.query.sqm.tree.SqmTypedNode; import org.hibernate.query.sqm.sql.internal.DomainResultProducer; /** * Models any aliased expression. E.g. `select exp as e ...` * where the aliased node is the complete `exp as e` "expression" - * `exp` is it's "wrapped node" and `e` is the alias. * * This will only ever be some kind of selection (dynamic-instantiation, * JPA select-object syntax, an expression or a dynamic-instantiation * argument). Each of these can be represented as a * {@link DomainResultProducer} which is ultimately * * @author Steve Ebersole */ public interface SqmAliasedNode<T> extends SqmTypedNode<T> { SqmSelectableNode<T> getSelectableNode(); String getAlias(); @Override default SqmBindableType<T> getNodeType() { return getSelectableNode().getNodeType(); } @Override default SqmBindableType<T> getExpressible() { return getSelectableNode().getExpressible(); } }
hibernate/hibernate-search
1,061
backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/gson/impl/JsonArrayAccessorImpl.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.backend.elasticsearch.gson.impl; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; public class JsonArrayAccessorImpl extends AbstractTypingJsonAccessor<JsonArray> implements JsonArrayAccessor, JsonCompositeAccessor<JsonArray> { public JsonArrayAccessorImpl(JsonAccessor<JsonElement> parentAccessor) { super( parentAccessor ); } @Override protected JsonElementType<JsonArray> getExpectedElementType() { return JsonElementTypes.ARRAY; } @Override public JsonArray getOrCreate(JsonObject root) { return getOrCreate( root, JsonArray::new ); } @Override public UnknownTypeJsonAccessor element(int index) { return new ArrayElementJsonAccessor( this, index ); } @Override public void addElementIfAbsent(JsonObject root, JsonElement newValue) { JsonArray array = getOrCreate( root ); if ( !array.contains( newValue ) ) { array.add( newValue ); } } }
hibernate/hibernate-search
1,063
backend/lucene/src/main/java/org/hibernate/search/backend/lucene/work/impl/CountWork.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.backend.lucene.work.impl; import java.io.IOException; import org.hibernate.search.backend.lucene.logging.impl.QueryLog; import org.apache.lucene.search.IndexSearcher; public class CountWork implements ReadWork<Integer> { private final LuceneSearcher<?, ?> searcher; CountWork(LuceneSearcher<?, ?> searcher) { this.searcher = searcher; } @Override public Integer execute(ReadWorkExecutionContext context) { try { IndexSearcher indexSearcher = context.createSearcher(); return searcher.count( indexSearcher ); } catch (IOException e) { throw QueryLog.INSTANCE.ioExceptionOnQueryExecution( searcher.getLuceneQueryForExceptions(), e.getMessage(), context.getEventContext(), e ); } } @Override public String toString() { StringBuilder sb = new StringBuilder( getClass().getSimpleName() ) .append( "[" ) .append( "searcher=" ).append( searcher ) .append( "]" ); return sb.toString(); } }
openjdk/jdk8
1,162
langtools/test/tools/javac/diags/examples/OperatorCantBeApplied1.java
/* * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.operator.cant.be.applied.1 class OperatorCantBeApplied1 { String s = ("a" - "b"); }
openjdk/jdk8
1,166
jdk/test/java/rmi/server/UnicastRemoteObject/unexportObject/Ping.java
/* * Copyright (c) 2000, 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.rmi.*; public interface Ping extends Remote { public void ping() throws RemoteException; }
openjdk/jdk8
1,170
langtools/test/tools/javac/diags/examples/CantExtendIntfAnno.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.cant.extend.intf.annotation @interface Anno { } @interface CantExtendIntfAnno extends Anno { }
openjdk/jdk8
1,182
jdk/test/java/lang/ClassLoader/deadlock/Alice.java
/* * Copyright (c) 2009, 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 comSA; public class Alice extends comSB.SupAlice { static { System.out.println("comSA.Alice loaded"); } }
openjdk/jdk8
1,186
jdk/test/sun/rmi/rmic/defaultStubVersion/G1.java
/* * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ import java.rmi.Remote; import java.rmi.RemoteException; public interface G1 extends Remote { void m() throws RemoteException; }
openjdk/jdk8
1,186
langtools/test/tools/javac/6948381/T6948381.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. */ /** * @test * @bug 6948381 * @summary javac Null Pointer Exception in Types.makeCompoundType * @compile npe/A.java npe/B.java */
openjdk/jtreg
1,197
test/modules/NoModulesTest.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 */ public class NoModulesTest { public static void main(String... args) { System.out.println("NoModulesTest"); } }
openjdk/jtreg
1,202
test/refIgnoreLines/Test.java
/* * Copyright (c) 2020, 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 * @compile/fail/ref=Test.out -XDrawDiagnostics Test.java */ public class Test { 1 // syntax error, for error message in Test.out }
openjdk/jtreg
1,203
test/6527624/A/BadA.java
/* * Copyright (c) 2007, 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 * @key B-only */ public class BadA { public static void main(String[] args) { throw new Error("should not happen"); } }
oracle/nosql
1,152
kvmain/src/main/java/oracle/kv/impl/security/login/TrustedLoginResponder.java
/*- * Copyright (C) 2011, 2025 Oracle and/or its affiliates. All rights reserved. * * This file was distributed by Oracle as part of a version of Oracle NoSQL * Database made available at: * * http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html * * Please see the LICENSE file included in the top-level directory of the * appropriate version of Oracle NoSQL Database for a copy of the license and * additional information. */ package oracle.kv.impl.security.login; import static oracle.kv.impl.async.StandardDialogTypeFamily.TRUSTED_LOGIN_TYPE_FAMILY; import java.util.concurrent.Executor; import java.util.logging.Logger; import oracle.kv.impl.async.JavaSerialResponder; /** * A responder (server-side) async dialog handler for TrustedLogin. */ public class TrustedLoginResponder extends JavaSerialResponder<TrustedLogin> { public TrustedLoginResponder(TrustedLogin server, Executor executor, Logger logger) { super(server, TrustedLogin.class, executor, TRUSTED_LOGIN_TYPE_FAMILY, logger); } }
oracle/nosql
1,162
kvmain/src/main/java/oracle/kv/impl/async/exception/package-info.java
/*- * Copyright (C) 2011, 2025 Oracle and/or its affiliates. All rights reserved. * * This file was distributed by Oracle as part of a version of Oracle NoSQL * Database made available at: * * http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html * * Please see the LICENSE file included in the top-level directory of the * appropriate version of Oracle NoSQL Database for a copy of the license and * additional information. */ package oracle.kv.impl.async.exception; /** * * INTERNAL: Exception classes for the async package. * * <p>There are three base classes: {@link ContextWriteException}, {@link * DialogException} and {@link ConnectionException}. * * <p>{@link ContextWriteException} occurs when {@link DialogContext#write} is * called. * * <p>{@link DialogException} is passed to {@link DialogHandler#onAbort} and * represents the cause of the dialog being aborted. * * <p>{@link ConnectionException} is the exception occuring for a connection * which is also used as the cause of the {@link DialogException} when a dialog * is being aborted because of the connection is discarded. */
oracle/oci-java-sdk
1,129
bmc-common/src/main/java/com/oracle/bmc/retrier/RetryOnOpenCircuitBreakerDefaultRetryCondition.java
/** * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ package com.oracle.bmc.retrier; import com.oracle.bmc.circuitbreaker.CallNotAllowedException; import com.oracle.bmc.model.BmcException; import jakarta.annotation.Nonnull; /** * Class that may retry for the conditions documented in * https://docs.oracle.com/iaas/Content/API/References/apierrors.htm and when the CircuitBreaker is * OPEN. */ public class RetryOnOpenCircuitBreakerDefaultRetryCondition extends DefaultRetryCondition { @Override public boolean shouldBeRetried(@Nonnull final BmcException exception) { if (exception == null) { throw new NullPointerException("exception is marked non-null but is null"); } return super.shouldBeRetried(exception) || exception.getCause() instanceof CallNotAllowedException; } }
apache/commons-math
1,121
commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/linear/RealMatrixFormatTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.math4.legacy.linear; import java.util.Locale; public class RealMatrixFormatTest extends RealMatrixFormatAbstractTest { @Override protected char getDecimalCharacter() { return '.'; } @Override protected Locale getLocale() { return Locale.US; } }
apache/commons-math
1,121
commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/linear/RealVectorFormatTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.math4.legacy.linear; import java.util.Locale; public class RealVectorFormatTest extends RealVectorFormatAbstractTest { @Override protected char getDecimalCharacter() { return '.'; } @Override protected Locale getLocale() { return Locale.US; } }
apache/cordova-android
1,158
framework/src/org/apache/cordova/ICordovaCookieManager.java
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.apache.cordova; public interface ICordovaCookieManager { public void setCookiesEnabled(boolean accept); public void setCookie(final String url, final String value); public String getCookie(final String url); public void clearCookies(); public void flush(); };
apache/crunch
1,164
crunch-spark/src/main/java/org/apache/crunch/fn/SparkDoFn.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.crunch.fn; import org.apache.crunch.DoFn; import org.apache.crunch.Emitter; abstract class SparkDoFn<T, R> extends DoFn<T, R> { @Override public final void initialize() { // Forced no-op for Spark compatibility } @Override public final void cleanup(Emitter<R> emitter) { // Forced no-op for Spark compatibility } }
apache/curator
1,131
curator-recipes/src/test/java/org/apache/curator/framework/state/DummyConnectionStateListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.curator.framework.state; import org.apache.curator.framework.CuratorFramework; public class DummyConnectionStateListener implements ConnectionStateListener { @Override public void stateChanged(CuratorFramework curatorFramework, ConnectionState connectionState) { // do nothing } }
apache/cxf
1,141
systests/container-integration/webapp/src/main/java/demo/spring/HelloWorldImpl.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ // START SNIPPET: service package demo.spring; import jakarta.jws.WebService; @WebService(endpointInterface = "demo.spring.HelloWorld") public class HelloWorldImpl implements HelloWorld { public String sayHi(String text) { System.out.println("sayHi called"); return "Hello " + text; } } // END SNIPPET: service
apache/cxf
1,155
integration/jca/src/main/java/org/apache/cxf/jca/cxf/CXFManagedConnection.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.jca.cxf; import jakarta.resource.ResourceException; import jakarta.resource.spi.ManagedConnection; public interface CXFManagedConnection extends ManagedConnection { void close(Object handle) throws ResourceException; CXFManagedConnectionFactory getManagedConnectionFactory(); CXFTransaction getCXFTransaction(); }
apache/cxf
1,157
core/src/main/java/org/apache/cxf/transport/DestinationWithEndpoint.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.transport; import org.apache.cxf.service.model.EndpointInfo; /** * A destination that has a specific endpoint. */ public interface DestinationWithEndpoint { /** * Return the ServiceModel endpoint description for this destination. * @return the endpoint description. */ EndpointInfo getEndpointInfo(); }
apache/deltaspike
1,104
deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc003/PageBean003.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.deltaspike.test.jsf.impl.config.view.custom.uc003; import org.apache.deltaspike.core.api.config.view.ViewConfig; import jakarta.enterprise.inject.Model; @Model class PageBean003 { public Class<? extends ViewConfig> item() { return Pages.Public.Item.class; } }
apache/deltaspike
1,124
deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/EchoService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.deltaspike.example.echo; /** * Interface for the different kinds of echo-services */ public interface EchoService { /** * Returns the given text again - the format might change * * @param message given message * @return message text */ String echo(String message); }
apache/directory-server
1,138
protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/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 the entry point to an instance of the * {@link org.apache.directory.server.dhcp.service.DhcpService}, * as well as the root of the exception hierarchy. * * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> */ package org.apache.directory.server.dhcp;
apache/dolphinscheduler
1,085
dolphinscheduler-extract/dolphinscheduler-extract-base/src/test/java/org/apache/dolphinscheduler/extract/base/utils/HostTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.extract.base.utils; import org.junit.jupiter.api.Test; import com.google.common.truth.Truth; class HostTest { @Test void testEquals() { Truth.assertThat(Host.of("localhost:8080")).isEqualTo(Host.of("localhost:8080")); } }
apache/doris-flink-connector
1,115
flink-doris-connector/src/main/java/org/apache/doris/flink/sink/schema/SchemaChangeMode.java
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. package org.apache.doris.flink.sink.schema; public enum SchemaChangeMode { DEBEZIUM_STRUCTURE("debezium_structure"), SQL_PARSER("sql_parser"); private final String name; SchemaChangeMode(String name) { this.name = name; } public String getName() { return name; } }
apache/drill
1,124
exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/store/provider/BasePersistentStoreProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.store.sys.store.provider; import org.apache.drill.exec.store.sys.PersistentStoreProvider; public abstract class BasePersistentStoreProvider implements PersistentStoreProvider { @Override public void start() throws Exception { } @Override public void close() throws Exception { } }
apache/druid
1,130
server/src/main/java/org/apache/druid/segment/realtime/appenderator/SegmentNotWritableException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.segment.realtime.appenderator; import org.apache.druid.java.util.common.StringUtils; public class SegmentNotWritableException extends Exception { public SegmentNotWritableException(String message, Object... messageArgs) { super(StringUtils.nonStrictFormat(message, messageArgs)); } }
apache/dubbo
1,153
dubbo-common/src/main/java/org/apache/dubbo/rpc/model/PackableMethodFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.rpc.model; import org.apache.dubbo.common.URL; import org.apache.dubbo.common.extension.ExtensionScope; import org.apache.dubbo.common.extension.SPI; @SPI(scope = ExtensionScope.FRAMEWORK) public interface PackableMethodFactory { PackableMethod create(MethodDescriptor methodDescriptor, URL url, String contentType); }
apache/dubbo
1,177
dubbo-common/src/test/java/com/service/Params.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES 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.service; import java.io.Serializable; import java.util.Map; public class Params implements Serializable { private static final long serialVersionUID = 1L; private Map<String, String> params; public Params(Map<String, String> params) { this.params = params; } public String get(String key) { return params.get(key); } }
apache/eagle
1,095
eagle-core/eagle-alert-parent/eagle-alert/alert-coordinator/src/main/java/org/apache/eagle/alert/coordinator/PolicySchedulerFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.eagle.alert.coordinator; import org.apache.eagle.alert.coordinator.impl.GreedyPolicyScheduler; /** * @since Mar 24, 2016. */ public class PolicySchedulerFactory { public static IPolicyScheduler createScheduler() { return new GreedyPolicyScheduler(); } }
apache/eventmesh
1,138
eventmesh-spi/src/test/java/org/apache/eventmesh/spi/example/TestPrototypeExtension.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.spi.example; import org.apache.eventmesh.spi.EventMeshExtensionType; import org.apache.eventmesh.spi.EventMeshSPI; /** * TestPrototypeExtension */ @EventMeshSPI(isSingleton = false, eventMeshExtensionType = EventMeshExtensionType.UNKNOWN) public interface TestPrototypeExtension { void hello(); }
apache/falcon
1,145
addons/hivedr/src/main/java/org/apache/falcon/hive/ReplicationEventMetadata.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.falcon.hive; import java.util.Map; import java.util.HashMap; /** * Replication event meta data class. */ public class ReplicationEventMetadata { private Map<String, String> eventFileMetadata = new HashMap<>(); public Map<String, String> getEventFileMetadata() { return eventFileMetadata; } }
apache/felix-dev
1,080
ipojo/manipulator/manipulator-it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/ParentClass.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.ipojo.runtime.core.components; public class ParentClass { private String name; public ParentClass(final String n) { name = n; } public ParentClass(final StringBuffer n) { name = n.toString(); } }
apache/felix-dev
1,115
scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Private_Map.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.scr.integration.components.activatesignature; import java.util.Map; public class Signature_Private_Map extends AbstractActivateSignatureTestComponent { @SuppressWarnings("unused") private void activate(Map<?, ?> config) { setMethodCalled( config ); } }
apache/fineract
1,085
fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanAccrualTransactionCreatedBusinessEvent.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.test.messaging.event.loan.transaction; public class LoanAccrualTransactionCreatedBusinessEvent extends AbstractLoanTransactionEvent { @Override public String getEventName() { return "LoanAccrualTransactionCreatedBusinessEvent"; } }
apache/flink-agents
1,165
plan/src/main/java/org/apache/flink/agents/plan/Function.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.agents.plan; /** Base interface to represent user defined function. */ public interface Function { /** execute function with arguments. */ Object call(Object... args) throws Exception; /** Check function signature matches the expectation or not. */ void checkSignature(Class<?>[] parameterTypes) throws Exception; }
apache/flink
1,117
flink-table/flink-table-common/src/main/java/org/apache/flink/table/data/columnar/vector/TimestampColumnVector.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.table.data.columnar.vector; import org.apache.flink.annotation.Internal; import org.apache.flink.table.data.TimestampData; /** Timestamp column vector. */ @Internal public interface TimestampColumnVector extends ColumnVector { TimestampData getTimestamp(int i, int precision); }
apache/geaflow
1,072
geaflow-kubernetes-operator/geaflow-kubernetes-operator-core/src/main/java/org/apache/geaflow/kubernetes/operator/core/model/exception/ConfigException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.kubernetes.operator.core.model.exception; public class ConfigException extends RuntimeException { public ConfigException(Throwable t) { super(t); } public ConfigException(String msg) { super(msg); } }
apache/gobblin
1,119
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/predicates/AlwaysFalse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.data.management.copy.predicates; import com.google.common.base.Predicate; import javax.annotation.Nullable; /** * Predicate that is always false. */ public class AlwaysFalse<T> implements Predicate<T> { @Override public boolean apply(@Nullable T input) { return false; } }
apache/gobblin
1,131
gobblin-modules/gobblin-http/src/main/java/org/apache/gobblin/http/ApacheHttpResponseStatus.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.http; import lombok.Getter; import lombok.Setter; @Getter @Setter public class ApacheHttpResponseStatus extends ResponseStatus { private int statusCode; private byte[] content = null; private String contentType = null; public ApacheHttpResponseStatus(StatusType type) { super(type); } }
apache/groovy
1,138
src/test/groovy/org/codehaus/groovy/tools/rootloadersync/ConcreteGenericJavaSubclass.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR 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.tools.rootloadersync; import java.util.Set; public class ConcreteGenericJavaSubclass extends AbstractGenericGroovySuperclass<String> { public ConcreteGenericJavaSubclass(Set<String> notes) { super(notes); } @Override protected void doSomething(String note) { } }
apache/groovy
1,167
src/test/groovy/groovy/lang/ScriptIntegerDivideTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package groovy.lang; import org.codehaus.groovy.classgen.TestSupport; public class ScriptIntegerDivideTest extends TestSupport { /** * Check integer division which is now a method call rather than the symbol "\". */ public void testIntegerDivide() throws Exception { assertScript("assert 4.intdiv(3) == 1"); } }
apache/guacamole-client
1,136
guacamole-ext/src/main/java/org/apache/guacamole/net/auth/ConnectionRecordSet.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.guacamole.net.auth; /** * The set of all available connection records, or a subset of those records. * * @deprecated * Use {@link ActivityRecordSet}&lt;{@link ConnectionRecord}&gt; instead. */ @Deprecated public interface ConnectionRecordSet extends ActivityRecordSet<ConnectionRecord> { }
apache/hadoop-common
1,068
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/rm/ContainerAllocator.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.mapreduce.v2.app.rm; import org.apache.hadoop.yarn.event.EventHandler; public interface ContainerAllocator extends EventHandler<ContainerAllocatorEvent>{ enum EventType { CONTAINER_REQ, CONTAINER_DEALLOCATE, CONTAINER_FAILED } }
apache/hadoop-common
1,100
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/FooterBlock.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.yarn.webapp.view; import org.apache.hadoop.classification.InterfaceAudience; @InterfaceAudience.LimitedPrivate({"YARN", "MapReduce"}) public class FooterBlock extends HtmlBlock { @Override protected void render(Block html) { html. div("#footer.ui-widget")._(); } }
apache/hadoop
1,088
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/security/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 /** * Helper classes for the shuffle/spill encryptions. */ package org.apache.hadoop.mapreduce.security; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/hadoop
1,120
hadoop-cloud-storage-project/hadoop-tos/src/main/java/org/apache/hadoop/fs/tosfs/commit/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. */ /** * Classes for hadoop-tos job committer. */ @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce", "YARN", "Hive"}) @InterfaceStability.Evolving package org.apache.hadoop.fs.tosfs.commit; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/hadoop
1,135
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/tags/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. */ /** * JUnit 5 tags. * <p> * For use in Hadoop's own test suites, and those which extend them, such as FileSystem contract * tests. */ @org.apache.hadoop.classification.InterfaceStability.Unstable @org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate("Derived Test Suites") package org.apache.hadoop.test.tags;
apache/hbase
1,137
hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/DecommissionedHostRejectedException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.hbase.ipc; import org.apache.hadoop.hbase.HBaseIOException; import org.apache.yetus.audience.InterfaceAudience; @InterfaceAudience.Public public class DecommissionedHostRejectedException extends HBaseIOException { public DecommissionedHostRejectedException(String message) { super(message); } }
apache/hbase
1,149
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CachedBlock.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.hbase.io.hfile; import org.apache.yetus.audience.InterfaceAudience; @InterfaceAudience.Private public interface CachedBlock extends Comparable<CachedBlock> { BlockPriority getBlockPriority(); BlockType getBlockType(); long getOffset(); long getSize(); long getCachedTime(); String getFilename(); }
apache/hbase
1,151
hbase-server/src/main/java/org/apache/hadoop/hbase/master/http/gson/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. */ /** * This package should be in the hbase-http module as {@code a.a.h.h.http.gson}. It is here instead * because hbase-http does not currently have a dependency on hbase-client, which is required for * implementing {@link org.apache.hadoop.hbase.master.http.gson.SizeAsBytesSerializer}. */ package org.apache.hadoop.hbase.master.http.gson;
apache/hive
1,133
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/CallbackFailedException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.hcatalog.templeton; import org.eclipse.jetty.http.HttpStatus; /** * The callback failed when it tried to reach the callback URL. */ public class CallbackFailedException extends SimpleWebException { public CallbackFailedException(String msg) { super(HttpStatus.BAD_REQUEST_400, msg); } }
apache/hudi
1,142
hudi-common/src/main/java/org/apache/hudi/exception/HoodieSecondaryIndexException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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; /** * Exception for Hudi secondary index. */ public class HoodieSecondaryIndexException extends HoodieException { public HoodieSecondaryIndexException(String message) { super(message); } public HoodieSecondaryIndexException(String message, Throwable t) { super(message, t); } }
apache/hudi
1,143
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/HoodieSparkRecordMerger.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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; import org.apache.hudi.common.model.HoodieRecord; import org.apache.hudi.common.model.HoodieRecordMerger; public abstract class HoodieSparkRecordMerger implements HoodieRecordMerger { @Override public HoodieRecord.HoodieRecordType getRecordType() { return HoodieRecord.HoodieRecordType.SPARK; } }
apache/hudi
1,157
hudi-cli/src/main/java/org/apache/hudi/cli/utils/TempViewProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.cli.utils; import java.io.Closeable; import java.util.List; public interface TempViewProvider extends Closeable { void createOrReplace(String tableName, List<String> headers, List<List<Comparable>> rows); void runQuery(String sqlText); void showAllViews(); void deleteTable(String tableName); void close(); }
apache/ignite-extensions
1,141
modules/ml-ext/ml/src/test/java/org/apache/ignite/ml/nn/MLPTestSuite.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.ml.nn; import org.junit.runner.RunWith; import org.junit.runners.Suite; /** * Test suite for multilayer perceptrons. */ @RunWith(Suite.class) @Suite.SuiteClasses({ MLPTest.class, MLPTrainerTest.class, LossFunctionsTest.class, MLPTrainerIntegrationTest.class }) public class MLPTestSuite { }
apache/ignite
1,094
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicMessageRecovery10ConnectionsTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.cache.distributed; /** * */ public class IgniteCacheAtomicMessageRecovery10ConnectionsTest extends IgniteCacheAtomicMessageRecoveryTest { /** {@inheritDoc} */ @Override protected int connectionsPerNode() { return 10; } }
apache/ignite
1,118
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorWithStoreSelfTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.cache; /** * Tests {@link org.apache.ignite.cache.CacheInterceptor}. */ public class GridCacheInterceptorWithStoreSelfTest extends GridCacheInterceptorSelfTest { /** {@inheritDoc} */ @Override protected boolean storeEnabled() { return true; } }
apache/ignite
1,119
modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cluster/PlatformClusterNodeFilter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.platform.cluster; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.lang.IgnitePredicate; /** * Platform cluster node filter marker interface. */ public interface PlatformClusterNodeFilter extends IgnitePredicate<ClusterNode> { // No-op. }
apache/ignite
1,121
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionedEntryEx.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.cache.version; /** * Extended versioned entry. */ public interface GridCacheVersionedEntryEx<K, V> extends GridCacheVersionedEntry<K, V>, GridCacheVersionable { /** * * @return {@code True} if entry is new. */ public boolean isStartVersion(); }
apache/ignite
1,127
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/RuntimeIndex.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.calcite.exec; /** * Runtime index interface. * The temporary index is built and available only on query execution. Not stored at the schema. */ public interface RuntimeIndex<Row> extends AutoCloseable { /** * Add row to index. */ void push(Row r); }
apache/ignite
1,150
modules/commons/src/main/java/org/apache/ignite/internal/util/ClassCache.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.util; /** * Class cache. */ public interface ClassCache { /** * Get class for the given name. * * @param clsName Class name. * @return Class. * @throws ClassNotFoundException If not found. */ public Class<?> getFromCache(String clsName) throws ClassNotFoundException; }
apache/ignite
1,154
modules/core/src/main/java/org/apache/ignite/spi/metric/BooleanMetric.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.spi.metric; /** * Interface for the metrics that holds boolean primitive. */ public interface BooleanMetric extends Metric { /** @return Value of the metric. */ public boolean value(); /** {@inheritDoc} */ @Override public default String getAsString() { return Boolean.toString(value()); } }
apache/incubator-atlas
1,135
webapp/src/main/java/org/apache/atlas/web/filters/AtlasResponseRequestWrapper.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.atlas.web.filters; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponseWrapper; public class AtlasResponseRequestWrapper extends HttpServletResponseWrapper { public AtlasResponseRequestWrapper(HttpServletResponse response) { super(response); } }
apache/incubator-datalab
1,113
services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/commands/ICommandExecutor.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES 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.backendapi.core.commands; import com.epam.datalab.process.model.ProcessInfo; public interface ICommandExecutor { ProcessInfo executeSync(String username, String uuid, String command) throws Exception; void executeAsync(String username, String uuid, String command); }
apache/incubator-hugegraph
1,118
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/job/algorithm/Algorithm.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.job.algorithm; import java.util.Map; import org.apache.hugegraph.job.UserJob; public interface Algorithm { String name(); String category(); Object call(UserJob<Object> job, Map<String, Object> parameters); void checkParameters(Map<String, Object> parameters); }
apache/incubator-kie-drools
1,054
drools-quarkus-extension/drools-quarkus-examples/drools-quarkus-examples-multiunit/src/main/java/org/drools/quarkus/ruleunit/examples/multiunit/RuleOutput2.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR 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.quarkus.ruleunit.examples.multiunit; public class RuleOutput2 { private final String text; public RuleOutput2(String text) { this.text = text; } public String getText() { return text; } }
apache/incubator-kie-drools
1,120
kie-internal/src/main/java/org/kie/internal/builder/conf/KnowledgeBuilderOptionsConfiguration.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.internal.builder.conf; import org.kie.api.conf.OptionsConfiguration; /** * A base interface for type safe configurations */ public interface KnowledgeBuilderOptionsConfiguration extends OptionsConfiguration<KnowledgeBuilderOption, SingleValueKieBuilderOption, MultiValueKieBuilderOption> { }
apache/incubator-kie-drools
1,145
kie-api/src/main/java/org/kie/api/event/rule/RuleFlowGroupEvent.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.api.event.rule; import org.kie.api.event.KieRuntimeEvent; import org.kie.api.runtime.rule.RuleFlowGroup; public interface RuleFlowGroupEvent extends KieRuntimeEvent { /** * The RuleFlowGroup for this event * * @return the RuleFlowGroup for this event */ RuleFlowGroup getRuleFlowGroup(); }
apache/incubator-kie-drools
1,149
kie-api/src/main/java/org/kie/api/runtime/rule/Operator.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.api.runtime.rule; /** * An interface for Operator definitions. */ public interface Operator { /** * @return the String representation for this operator */ String getOperatorString(); /** * @return true if this operator instance is negated, otherwise false. */ boolean isNegated(); }
apache/incubator-kie-kogito-apps
1,090
data-index/data-index-storage/data-index-storage-jpa/src/test/java/org/kie/kogito/index/jdbc/storage/H2JobStorageIT.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.kogito.index.jdbc.storage; import org.kie.kogito.index.jpa.storage.AbstractJobStorageIT; import io.quarkus.test.TestTransaction; import io.quarkus.test.junit.QuarkusTest; @QuarkusTest @TestTransaction public class H2JobStorageIT extends AbstractJobStorageIT { }
apache/incubator-kie-kogito-runtimes
1,061
kogito-serverless-workflow/kogito-serverless-workflow-grpc-parser/src/main/java/org/kie/kogito/serverless/workflow/utils/RPCWorkflowUtils.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.kogito.serverless.workflow.utils; public class RPCWorkflowUtils { public static String getRPCClassName(String serviceName) { return "RPC_" + serviceName + "_WorkItemHandler"; } private RPCWorkflowUtils() { } }
apache/incubator-kie-optaplanner
1,070
core/optaplanner-core-impl/src/test/java/org/optaplanner/core/config/solver/testutil/calculator/TestdataCorruptedDifferentValuesCalculator.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR 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.config.solver.testutil.calculator; public class TestdataCorruptedDifferentValuesCalculator extends AbstractTestdataDifferentValuesCalculator { public TestdataCorruptedDifferentValuesCalculator() { super(true); } }
apache/incubator-kie-optaplanner
1,116
core/optaplanner-core-impl/src/main/java/org/optaplanner/core/api/domain/common/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. */ @XmlSchema( namespace = SolverConfig.XML_NAMESPACE, elementFormDefault = XmlNsForm.QUALIFIED) package org.optaplanner.core.api.domain.common; import jakarta.xml.bind.annotation.XmlNsForm; import jakarta.xml.bind.annotation.XmlSchema; import org.optaplanner.core.config.solver.SolverConfig;
apache/incubator-livy
1,151
test-lib/src/main/java/org/apache/livy/test/jobs/GetCurrentUser.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.test.jobs; import org.apache.hadoop.security.UserGroupInformation; import org.apache.livy.Job; import org.apache.livy.JobContext; public class GetCurrentUser implements Job<String> { @Override public String call(JobContext jc) throws Exception { return UserGroupInformation.getCurrentUser().getUserName(); } }
apache/incubator-seata
1,131
rm-datasource/src/main/java/org/apache/seata/rm/datasource/undo/SQLUndoDirtyException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seata.rm.datasource.undo; import java.io.Serializable; import java.sql.SQLException; class SQLUndoDirtyException extends SQLException implements Serializable { private static final long serialVersionUID = -5168905669539637570L; SQLUndoDirtyException(String reason) { super(reason); } }
apache/inlong
1,098
inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/resource/sink/TestStandaloneSinkResourceOperator.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.inlong.manager.service.resource.sink; import org.springframework.stereotype.Service; @Service public class TestStandaloneSinkResourceOperator extends AbstractStandaloneSinkResourceOperator { @Override public Boolean accept(String sinkType) { return null; } }
apache/inlong
1,130
inlong-common/src/main/java/org/apache/inlong/common/pojo/sort/dataflow/sink/PulsarSinkConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.inlong.common.pojo.sort.dataflow.sink; import lombok.Data; import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = true) @Data public class PulsarSinkConfig extends SinkConfig { private String pulsarTenant; private String namespace; private String topic; private Integer partitionNum; }
apache/inlong
1,140
inlong-audit/audit-common/src/main/java/org/apache/inlong/audit/entity/AuditRoute.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.inlong.audit.entity; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @NoArgsConstructor @AllArgsConstructor public class AuditRoute { private String address; private String auditId; private String inlongGroupIdsInclude; private String inlongGroupIdsExclude; }
apache/iotdb
1,117
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/trigger/exception/TriggerJarTooLargeException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.commons.trigger.exception; public class TriggerJarTooLargeException extends RuntimeException { public TriggerJarTooLargeException(String message) { super(message); } public TriggerJarTooLargeException(String message, Throwable cause) { super(message, cause); } }
apache/iotdb
1,119
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/SimplePlanVisitor.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.queryengine.plan.planner.plan.node; public class SimplePlanVisitor<C> extends PlanVisitor<Void, C> { @Override public Void visitPlan(PlanNode node, C context) { for (PlanNode source : node.getChildren()) { source.accept(this, context); } return null; } }
apache/jackrabbit-oak
1,116
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/locks/NodeDocumentLocks.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.plugins.document.locks; import java.util.concurrent.locks.Lock; public interface NodeDocumentLocks { /** * Acquires a lock for the given key. * * @param key a key. * @return the acquired lock for the given key. */ Lock acquire(String key); }
apache/jackrabbit-oak
1,131
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/tika/BinaryResourceProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.plugins.tika; import org.apache.commons.collections4.FluentIterable; import java.io.IOException; /** * Provides an iterator for binaries present under given path */ interface BinaryResourceProvider { FluentIterable<BinaryResource> getBinaries(String path) throws IOException; }
apache/jackrabbit
1,125
jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/ParseException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.spi.commons.privilege; /** * <code>ParseException</code>... */ public class ParseException extends Exception { public ParseException(Throwable throwable) { super(throwable); } public ParseException(String s, Throwable throwable) { super(s, throwable); } }
apache/jclouds
1,160
apis/atmos/src/main/java/org/jclouds/atmos/domain/FileType.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jclouds.atmos.domain; public enum FileType { DIRECTORY, REGULAR, UNRECOGNIZED; public String value() { return name().toLowerCase(); } public static FileType fromValue(String v) { try { return valueOf(v.toUpperCase()); } catch (IllegalArgumentException e) { return UNRECOGNIZED; } } }
apache/jena
1,152
jena-core/src/test/java/org/apache/jena/ttl_test/turtle/TurtleEventHandler.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.ttl_test.turtle; import org.apache.jena.graph.Triple; public interface TurtleEventHandler { public void triple(int line, int col, Triple triple); public void prefix(int line, int col, String prefix, String iri); public void startFormula(int line, int col); public void endFormula(int line, int col); }
apache/jena
1,169
jena-arq/src/main/java/org/apache/jena/sparql/DoesNotExist.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.sparql; import org.apache.jena.shared.JenaException ; public class DoesNotExist extends JenaException { public DoesNotExist() { super() ; } public DoesNotExist(Throwable cause) { super(cause) ; } public DoesNotExist(String msg) { super(msg) ; } public DoesNotExist(String msg, Throwable cause) { super(msg, cause) ; } }
apache/kyuubi
1,125
kyuubi-hive-beeline/src/main/java/org/apache/hive/beeline/hs2connection/BeelineSiteParseException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.beeline.hs2connection; @SuppressWarnings("serial") public class BeelineSiteParseException extends BeelineConfFileParseException { public BeelineSiteParseException(String msg, Exception e) { super(msg, e); } public BeelineSiteParseException(String msg) { super(msg); } }
apache/kyuubi
1,162
kyuubi-util-scala/src/test/java/org/apache/kyuubi/tags/HudiTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kyuubi.tags; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.scalatest.TagAnnotation; @TagAnnotation @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD, ElementType.TYPE}) public @interface HudiTest {}
apache/logging-flume
1,141
flume-ng-core/src/main/java/org/apache/flume/source/PollableSourceConstants.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.flume.source; public class PollableSourceConstants { public static final String BACKOFF_SLEEP_INCREMENT = "backoffSleepIncrement"; public static final String MAX_BACKOFF_SLEEP = "maxBackoffSleep"; public static final long DEFAULT_BACKOFF_SLEEP_INCREMENT = 1000; public static final long DEFAULT_MAX_BACKOFF_SLEEP = 5000; }
apache/lucene
1,174
lucene/core/src/java/org/apache/lucene/store/MergeInfo.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.lucene.store; /** * A MergeInfo provides information required for a MERGE context. It is used as part of an {@link * IOContext} in case of MERGE context. * * <p>These values are only estimates and are not the actual values. */ public record MergeInfo( int totalMaxDoc, long estimatedMergeBytes, boolean isExternal, int mergeMaxNumSegments) {}
apache/marmotta
1,116
platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/events/ConfigurationServiceInitEvent.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.marmotta.platform.core.events; /** * Raised when the configuration service finishes its initialisation (but before the system has finished startup). * <p/> * Author: Sebastian Schaffert */ public class ConfigurationServiceInitEvent { public ConfigurationServiceInitEvent() { } }
apache/maven-dependency-plugin
1,131
src/it/projects/analyze-multimodule-project/module1/src/main/java/foo/Main.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package foo; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.metadata.Metadata; import org.apache.maven.model.Model; public class Main { public static final String SCOPE_COMPILE = Artifact.SCOPE_COMPILE; public Model model = null; public Metadata metadata = null; }