repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/tomcat80 | 1,174 | test/org/apache/jasper/compiler/TesterTagPlugin.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jasper.compiler;
import org.apache.jasper.compiler.tagplugin.TagPlugin;
import org.apache.jasper.compiler.tagplugin.TagPluginContext;
/**
* Plug-in for {@link TesterTag}.
*/
public class TesterTagPlugin implements TagPlugin {
@Override
public void doTag(TagPluginContext ctxt) {
ctxt.generateJavaSource("//Just a comment");
}
} |
apache/tomee | 1,125 | tck/microprofile-tck/jwt/src/test/java/org/apache/tomee/microprofile/tck/jwt/config/KeyApplication.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tomee.microprofile.tck.jwt.config;
import org.eclipse.microprofile.auth.LoginConfig;
import jakarta.ws.rs.ApplicationPath;
import jakarta.ws.rs.core.Application;
@LoginConfig(authMethod = "MP-JWT", realmName = "TCK-MP-JWT")
@ApplicationPath("/key")
public class KeyApplication extends Application {
}
|
apache/tomee | 1,133 | server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/config/WSS4JInInterceptorFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.openejb.server.cxf.config;
import org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor;
/**
* @version $Rev$ $Date$
*/
public class WSS4JInInterceptorFactory extends WSS4JInterceptorFactoryBase {
public WSS4JInInterceptor create() {
return new WSS4JInInterceptor(getAndDestroyMap());
}
}
|
apache/tomee | 1,139 | container/openejb-junit/src/main/java/org/apache/openejb/junit/jee/config/PropertyFile.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.openejb.junit.jee.config;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface PropertyFile {
String value() default "";
}
|
apache/tomee | 1,141 | examples/movies-complete-meta/src/main/java/org/superbiz/injection/tx/AddInterceptor.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.superbiz.injection.tx;
import jakarta.interceptor.AroundInvoke;
import jakarta.interceptor.InvocationContext;
/**
* @version $Revision$ $Date$
*/
public class AddInterceptor {
@AroundInvoke
public Object invoke(InvocationContext context) throws Exception {
// Log Add
return context.proceed();
}
} |
apache/wicket | 1,117 | wicket-core-tests/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxTestBorder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.ajax.markup.html.ajaxLink;
import org.apache.wicket.markup.html.border.Border;
/**
*
*/
public class AjaxTestBorder extends Border
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*
* @param id
*/
public AjaxTestBorder(String id)
{
super(id);
}
}
|
apache/wicket | 1,127 | wicket-core-tests/src/test/java/org/apache/wicket/markup/MarkupInheritancePage_6.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup;
import org.apache.wicket.markup.html.WebPage;
/**
*/
public class MarkupInheritancePage_6 extends WebPage
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*
*/
public MarkupInheritancePage_6()
{
add(new MarkupInheritanceExtensionPanel_6("panel"));
}
}
|
apache/wicket | 1,127 | wicket-core-tests/src/test/java/org/apache/wicket/markup/MarkupInheritancePage_9.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup;
import org.apache.wicket.markup.html.WebPage;
/**
*/
public class MarkupInheritancePage_9 extends WebPage
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*
*/
public MarkupInheritancePage_9()
{
add(new MarkupInheritanceExtensionPanel_9("panel"));
}
}
|
apache/wicket | 1,130 | wicket-core-tests/src/test/java/org/apache/wicket/resource/loader/TestPage_1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.resource.loader;
import org.apache.wicket.markup.html.basic.Label;
/**
* Mock page for testing.
*
*/
public class TestPage_1 extends XmlPage
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*/
public TestPage_1()
{
add(new Label("item", getString("myTest")));
}
}
|
apache/xmlgraphics-fop | 1,155 | fop-core/src/test/java/org/apache/fop/fo/LoadingException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* $Id$ */
package org.apache.fop.fo;
/**
* This class specifies an exceptional condition that occurred while an XSL-FO document
* was being parsed.
*/
public class LoadingException extends Exception {
private static final long serialVersionUID = 7529029475875542916L;
LoadingException(Throwable cause) {
super(cause);
}
}
|
google/cdep | 1,162 | cdep/src/main/java/io/cdep/cdep/ast/finder/ModuleExpression.java | /*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.cdep.cdep.ast.finder;
import io.cdep.annotations.NotNull;
import io.cdep.cdep.Coordinate;
import java.util.Set;
public class ModuleExpression extends StatementExpression {
@NotNull
final public ModuleArchiveExpression archive;
@NotNull
final public Set<Coordinate> dependencies;
public ModuleExpression(@NotNull ModuleArchiveExpression archive, @NotNull Set<Coordinate> dependencies) {
for(Coordinate coordinate : dependencies) {
assert coordinate != null;
}
this.archive = archive;
this.dependencies = dependencies;
}
}
|
google/depan | 1,128 | DepanViewDoc/prod/src/com/google/devtools/depan/eclipse/preferences/ColorPreferencesIds.java | /*
* Copyright 2007 The Depan Project Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.devtools.depan.eclipse.preferences;
/**
* An namespace class for color preferences IDs.
*
* @author ycoppel@google.com (Yohann Coppel)
*/
public final class ColorPreferencesIds {
private ColorPreferencesIds() {
// Prevent instantiation.
}
public static final String COLORS_PREFIX =
PreferencesIds.VIEW_PREFIX + "color_";
public static final String COLOR_BACKGROUND = COLORS_PREFIX + "background";
public static final String COLOR_FOREGROUND = COLORS_PREFIX + "foreground";
}
|
google/j2cl | 1,190 | jre/java/java/lang/CaseMapper.java | /*
* Copyright 2021 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package java.lang;
/** Performs case operations. Abstracted so can be platform specific. */
final class CaseMapper {
public static int codePointToLowerCase(int c) {
return String.fromCodePoint(c).toLowerCase().codePointAt(0);
}
public static int codePointToUpperCase(int c) {
return String.fromCodePoint(c).toUpperCase().codePointAt(0);
}
public static char charToLowerCase(char c) {
return String.valueOf(c).toLowerCase().charAt(0);
}
public static char charToUpperCase(char c) {
return String.valueOf(c).toUpperCase().charAt(0);
}
private CaseMapper() {}
}
|
google/j2objc | 1,115 | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/data/HolidayBundle_ja_JP.java | /* GENERATED SOURCE. DO NOT MODIFY. */
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html#License
/*
*******************************************************************************
* Copyright (C) 1996-2010, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
package android.icu.impl.data;
import java.util.Calendar;
import java.util.ListResourceBundle;
import android.icu.util.Holiday;
import android.icu.util.SimpleHoliday;
/**
* @hide Only a subset of ICU is exposed in Android
*/
public class HolidayBundle_ja_JP extends ListResourceBundle {
static private final Holiday[] fHolidays = {
new SimpleHoliday(Calendar.FEBRUARY, 11, 0, "National Foundation Day"),
};
static private final Object[][] fContents = {
{ "holidays", fHolidays },
};
@Override
public synchronized Object[][] getContents() { return fContents; }
}
|
google/nomulus | 1,153 | core/src/main/java/google/registry/model/domain/metadata/package-info.java | // Copyright 2017 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
@XmlSchema(
namespace = "urn:google:params:xml:ns:metadata-1.0",
xmlns = @XmlNs(prefix = "metadata", namespaceURI = "urn:google:params:xml:ns:metadata-1.0"),
elementFormDefault = XmlNsForm.QUALIFIED)
@XmlAccessorType(XmlAccessType.FIELD)
package google.registry.model.domain.metadata;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlNs;
import jakarta.xml.bind.annotation.XmlNsForm;
import jakarta.xml.bind.annotation.XmlSchema;
|
googleads/google-ads-java | 1,109 | google-ads-stubs-v19/src/main/java/com/google/ads/googleads/v19/common/UserInterestSegmentOrBuilder.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v19/common/audiences.proto
// Protobuf Java Version: 3.25.7
package com.google.ads.googleads.v19.common;
public interface UserInterestSegmentOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v19.common.UserInterestSegment)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The user interest resource.
* </pre>
*
* <code>optional string user_interest_category = 1;</code>
* @return Whether the userInterestCategory field is set.
*/
boolean hasUserInterestCategory();
/**
* <pre>
* The user interest resource.
* </pre>
*
* <code>optional string user_interest_category = 1;</code>
* @return The userInterestCategory.
*/
java.lang.String getUserInterestCategory();
/**
* <pre>
* The user interest resource.
* </pre>
*
* <code>optional string user_interest_category = 1;</code>
* @return The bytes for userInterestCategory.
*/
com.google.protobuf.ByteString
getUserInterestCategoryBytes();
}
|
googleads/google-ads-java | 1,109 | google-ads-stubs-v20/src/main/java/com/google/ads/googleads/v20/common/UserInterestSegmentOrBuilder.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v20/common/audiences.proto
// Protobuf Java Version: 3.25.7
package com.google.ads.googleads.v20.common;
public interface UserInterestSegmentOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v20.common.UserInterestSegment)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The user interest resource.
* </pre>
*
* <code>optional string user_interest_category = 1;</code>
* @return Whether the userInterestCategory field is set.
*/
boolean hasUserInterestCategory();
/**
* <pre>
* The user interest resource.
* </pre>
*
* <code>optional string user_interest_category = 1;</code>
* @return The userInterestCategory.
*/
java.lang.String getUserInterestCategory();
/**
* <pre>
* The user interest resource.
* </pre>
*
* <code>optional string user_interest_category = 1;</code>
* @return The bytes for userInterestCategory.
*/
com.google.protobuf.ByteString
getUserInterestCategoryBytes();
}
|
googleads/google-ads-java | 1,109 | google-ads-stubs-v21/src/main/java/com/google/ads/googleads/v21/common/UserInterestSegmentOrBuilder.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v21/common/audiences.proto
// Protobuf Java Version: 3.25.7
package com.google.ads.googleads.v21.common;
public interface UserInterestSegmentOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v21.common.UserInterestSegment)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The user interest resource.
* </pre>
*
* <code>optional string user_interest_category = 1;</code>
* @return Whether the userInterestCategory field is set.
*/
boolean hasUserInterestCategory();
/**
* <pre>
* The user interest resource.
* </pre>
*
* <code>optional string user_interest_category = 1;</code>
* @return The userInterestCategory.
*/
java.lang.String getUserInterestCategory();
/**
* <pre>
* The user interest resource.
* </pre>
*
* <code>optional string user_interest_category = 1;</code>
* @return The bytes for userInterestCategory.
*/
com.google.protobuf.ByteString
getUserInterestCategoryBytes();
}
|
googleapis/google-cloud-java | 1,045 | java-securitycenter-settings/proto-google-cloud-securitycenter-settings-v1beta1/src/main/java/com/google/cloud/securitycenter/settings/v1beta1/WebSecurityScannerOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/securitycenter/settings/v1beta1/component_settings.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.securitycenter.settings.v1beta1;
public interface WebSecurityScannerOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.settings.v1beta1.WebSecurityScanner)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,050 | java-assured-workloads/proto-google-cloud-assured-workloads-v1beta1/src/main/java/com/google/cloud/assuredworkloads/v1beta1/RestrictAllowedResourcesResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/assuredworkloads/v1beta1/assuredworkloads.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.assuredworkloads.v1beta1;
public interface RestrictAllowedResourcesResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,056 | java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DisableAdvancedSiteSearchResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/discoveryengine/v1beta/site_search_engine_service.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.discoveryengine.v1beta;
public interface DisableAdvancedSiteSearchResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DisableAdvancedSiteSearchResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,057 | java-errorreporting/proto-google-cloud-error-reporting-v1beta1/src/main/java/com/google/devtools/clouderrorreporting/v1beta1/ReportErrorEventResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto
// Protobuf Java Version: 3.25.8
package com.google.devtools.clouderrorreporting.v1beta1;
public interface ReportErrorEventResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse)
com.google.protobuf.MessageOrBuilder {}
|
googlearchive/caja | 1,174 | src/com/google/caja/lexer/TokenConsumer.java | // Copyright (C) 2008 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.caja.lexer;
import javax.annotation.Nullable;
/**
* Receives a set of tokens corresponding to a rendered parse tree.
*
* @author mikesamuel@gmail.com
*/
public interface TokenConsumer {
/**
* Marks tokens {@link #consume consumed} before the next call as falling in
* this range of file positions.
* @param pos null indicates don't know.
*/
void mark(@Nullable FilePosition pos);
/** Receives tokens from rendered parse trees. */
void consume(String text);
/** Called when no more tokens are available. */
void noMoreTokens();
}
|
hibernate/hibernate-ogm | 1,102 | core/src/main/java/org/hibernate/ogm/model/spi/AssociationOperation.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.model.spi;
import org.hibernate.ogm.model.key.spi.RowKey;
/**
* Operation applied to the association.
* A RowKey is provided and when it makes sense a Tuple
* (eg DELETE or PUT_NULL do not have tuples)
*
* @author Emmanuel Bernard <emmanuel@hibernate.org>
*/
public class AssociationOperation {
private final RowKey key;
private final Tuple value;
private final AssociationOperationType type;
public AssociationOperation(RowKey key, Tuple value, AssociationOperationType type) {
this.key = key;
this.value = value;
this.type = type;
}
public RowKey getKey() {
return key;
}
public Tuple getValue() {
return value;
}
public AssociationOperationType getType() {
return type;
}
@Override
public String toString() {
return "AssociationOperation [key=" + key + ", type=" + type + "]";
}
}
|
hibernate/hibernate-ogm | 1,114 | core/src/main/java/org/hibernate/ogm/datastore/keyvalue/options/navigation/KeyValueStoreGlobalContext.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.keyvalue.options.navigation;
import org.hibernate.ogm.datastore.keyvalue.options.CacheMappingType;
import org.hibernate.ogm.options.navigation.GlobalContext;
/**
* Allows to configure key/value store options applying on a global level. These options may be overridden for single
* entities or properties.
*
* @author Gunnar Morling
*/
public interface KeyValueStoreGlobalContext<G extends KeyValueStoreGlobalContext<G, E>, E extends KeyValueStoreEntityContext<E, ?>> extends GlobalContext<G, E> {
/**
* Specifies how data (entity, associations, id source) should be mapped to caches.
*
* @param cacheMapping the cache mapping type to be used when not configured on the entity or property level
* @return this context, allowing for further fluent API invocations
*/
G cacheMapping(CacheMappingType cacheMapping);
}
|
hibernate/hibernate-orm | 1,066 | hibernate-core/src/test/java/org/hibernate/orm/test/query/resultcache/TestEntity.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.query.resultcache;
import java.time.Instant;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Temporal;
import jakarta.persistence.TemporalType;
/**
* @author Steve Ebersole
*/
@Entity
public class TestEntity {
@Id
private Integer id;
private String name;
@Temporal( TemporalType.TIMESTAMP )
private Instant instant;
public TestEntity() {
}
public TestEntity(Integer id, String name) {
this( id, name, Instant.now() );
}
public TestEntity(Integer id, String name, Instant instant) {
this.id = id;
this.name = name;
this.instant = instant;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Instant getInstant() {
return instant;
}
public void setInstant(Instant instant) {
this.instant = instant;
}
}
|
hibernate/hibernate-orm | 1,073 | hibernate-core/src/test/java/org/hibernate/orm/test/annotations/various/Conductor.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.annotations.various;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.Index;
import jakarta.persistence.Table;
import jakarta.persistence.Version;
import org.hibernate.annotations.OptimisticLock;
/**
* @author Emmanuel Bernard
*/
@Entity
@Table(indexes = @Index(name = "cond_name", columnList = "cond_name"))
public class Conductor {
@Id
@GeneratedValue
private Integer id;
@Column(name = "cond_name")
@OptimisticLock(excluded = true)
private String name;
@Version
private Long version;
public Long getVersion() {
return version;
}
public void setVersion(Long version) {
this.version = version;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
hibernate/hibernate-orm | 1,086 | hibernate-testing/src/main/java/org/hibernate/testing/logger/LoggerInspectionRule.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.testing.logger;
import java.util.Set;
import org.junit.rules.ExternalResource;
import org.jboss.logging.BasicLogger;
public final class LoggerInspectionRule extends ExternalResource {
private final BasicLogger log;
public LoggerInspectionRule(BasicLogger log) {
this.log = log;
}
@Override
protected void before() throws Throwable {
// do nothing
}
@Override
protected void after() {
LogInspectionHelper.clearAllListeners( log );
}
public void registerListener(LogListener listener) {
LogInspectionHelper.registerListener( listener, log );
}
public Triggerable watchForLogMessages(String prefix) {
TriggerOnPrefixLogListener listener = new TriggerOnPrefixLogListener( prefix );
registerListener( listener );
return listener;
}
public Triggerable watchForLogMessages(Set<String> prefixes) {
TriggerOnPrefixLogListener listener = new TriggerOnPrefixLogListener( prefixes );
registerListener( listener );
return listener;
}
}
|
hibernate/hibernate-orm | 1,106 | hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/ExtractUnit.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.sql.ast.tree.expression;
import org.hibernate.metamodel.mapping.BasicValuedMapping;
import org.hibernate.query.common.TemporalUnit;
import org.hibernate.sql.ast.SqlAstWalker;
import org.hibernate.sql.ast.tree.SqlAstNode;
/**
* A {@link TemporalUnit} passed as an argument to the
* {@link org.hibernate.dialect.function.ExtractFunction}.
* These are different to {@link DurationUnit}s because of
* how the {@link TemporalUnit#WEEK} field is handled on
* some platforms.
*
* @author Gavin King
*/
public class ExtractUnit implements Expression, SqlAstNode {
private final TemporalUnit unit;
private final BasicValuedMapping type;
public ExtractUnit(TemporalUnit unit, BasicValuedMapping type) {
this.unit = unit;
this.type = type;
}
public TemporalUnit getUnit() {
return unit;
}
@Override
public BasicValuedMapping getExpressionType() {
return type;
}
@Override
public void accept(SqlAstWalker sqlTreeWalker) {
sqlTreeWalker.visitExtractUnit( this );
}
}
|
hibernate/hibernate-orm | 1,108 | hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/IntegerDivisionTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.query.hql;
import org.hibernate.testing.orm.junit.DomainModel;
import org.hibernate.testing.orm.junit.ServiceRegistry;
import org.hibernate.testing.orm.junit.SessionFactory;
import org.hibernate.testing.orm.junit.SessionFactoryScope;
import org.hibernate.testing.orm.junit.Setting;
import org.junit.jupiter.api.Test;
import static org.hibernate.cfg.QuerySettings.PORTABLE_INTEGER_DIVISION;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
@DomainModel
@SessionFactory
@ServiceRegistry(settings = @Setting(name = PORTABLE_INTEGER_DIVISION, value = "true"))
public class IntegerDivisionTest {
@Test
public void testIntegerDivision(SessionFactoryScope scope) {
scope.inTransaction(s -> {
assertFalse( s.createQuery("select 1 where 1/2 = 0 and 4/3 = 1", Integer.class)
.getResultList().isEmpty() );
assertEquals( 1, s.createQuery("select 4/3", Integer.class)
.getSingleResult() );
});
}
}
|
hibernate/hibernate-orm | 1,125 | hibernate-core/src/main/java/org/hibernate/event/service/spi/EventListenerRegistry.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.event.service.spi;
import org.hibernate.event.spi.EventType;
import org.hibernate.service.Service;
/**
* Service for accessing each {@link EventListenerGroup} by {@link EventType},
* along with convenience methods for managing the listeners registered in
* each {@link EventListenerGroup}.
*
* @author Steve Ebersole
*/
@SuppressWarnings("unchecked") // heap pollution due to varargs
public interface EventListenerRegistry extends Service {
<T> EventListenerGroup<T> getEventListenerGroup(EventType<T> eventType);
void addDuplicationStrategy(DuplicationStrategy strategy);
<T> void setListeners(EventType<T> type, Class<? extends T>... listeners);
<T> void setListeners(EventType<T> type, T... listeners);
<T> void appendListeners(EventType<T> type, Class<? extends T>... listeners);
<T> void appendListeners(EventType<T> type, T... listeners);
<T> void prependListeners(EventType<T> type, Class<? extends T>... listeners);
<T> void prependListeners(EventType<T> type, T... listeners);
}
|
hibernate/hibernate-search | 1,024 | util/internal/integrationtest/backend/lucene-common/src/main/java/org/hibernate/search/util/impl/integrationtest/backend/lucene/LuceneAnalysisUtils.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.util.impl.integrationtest.backend.lucene;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
public final class LuceneAnalysisUtils {
private LuceneAnalysisUtils() {
}
public static List<String> analyze(Analyzer analyzer, String absoluteFieldPath,
String inputString)
throws IOException {
final List<String> tokenList = new ArrayList<>();
try ( TokenStream stream = analyzer.tokenStream( absoluteFieldPath, inputString ) ) {
CharTermAttribute term = stream.addAttribute( CharTermAttribute.class );
stream.reset();
while ( stream.incrementToken() ) {
String s = new String( term.buffer(), 0, term.length() );
tokenList.add( s );
}
stream.end();
}
return tokenList;
}
}
|
hibernate/hibernate-search | 1,040 | backend/lucene/src/main/java/org/hibernate/search/backend/lucene/lowlevel/docvalues/impl/SingletonNumericDoubleDocValues.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.backend.lucene.lowlevel.docvalues.impl;
import java.io.IOException;
import org.apache.lucene.index.NumericDocValues;
abstract class SingletonNumericDoubleDocValues extends SortedNumericDoubleDocValues {
protected final NumericDocValues values;
SingletonNumericDoubleDocValues(NumericDocValues values) {
this.values = values;
}
public abstract NumericDoubleValues toNumericDoubleValues();
@Override
public final boolean advanceExact(int doc) throws IOException {
return values.advanceExact( doc );
}
@Override
public final int advance(int target) throws IOException {
return values.advance( target );
}
@Override
public final int nextDoc() throws IOException {
return values.nextDoc();
}
@Override
public final int docID() {
return values.docID();
}
@Override
public final int docValueCount() {
return 1;
}
@Override
public final long cost() {
return values.cost();
}
}
|
hibernate/hibernate-search | 1,094 | lucene-next/backend/lucene/src/main/java/org/hibernate/search/backend/lucene/work/impl/LuceneSearcher.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.lowlevel.reader.impl.IndexReaderMetadataResolver;
import org.hibernate.search.engine.search.timeout.spi.TimeoutManager;
import org.apache.lucene.search.Explanation;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
public interface LuceneSearcher<R, ER> {
R search(IndexSearcher indexSearcher, IndexReaderMetadataResolver metadataResolver,
int offset, Integer limit, int totalHitCountThreshold)
throws IOException;
ER scroll(IndexSearcher indexSearcher, IndexReaderMetadataResolver metadataResolver,
int offset, int limit, int totalHitCountThreshold)
throws IOException;
int count(IndexSearcher indexSearcher) throws IOException;
Explanation explain(IndexSearcher indexSearcher, int luceneDocId) throws IOException;
Query getLuceneQueryForExceptions();
void setTimeoutManager(TimeoutManager timeoutManager);
}
|
hibernate/hibernate-shards | 1,149 | src/main/java/org/hibernate/shards/query/SetCacheRegionEvent.java | /**
* Copyright (C) 2007 Google Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library 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
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
package org.hibernate.shards.query;
import org.hibernate.Query;
/**
* @author Maulik Shah
*/
public class SetCacheRegionEvent implements QueryEvent {
private final String cacheRegion;
public SetCacheRegionEvent(String cacheRegion) {
this.cacheRegion = cacheRegion;
}
public void onEvent(Query query) {
query.setCacheRegion(cacheRegion);
}
}
|
hibernate/hibernate-shards | 1,156 | src/main/java/org/hibernate/shards/session/RequiresSession.java | /**
* Copyright (C) 2007 Google Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library 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
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
package org.hibernate.shards.session;
import org.hibernate.Session;
/**
* Interface describing an object that can have a Session set on it. This
* is designed to be used in conjunction with stateful interceptors.
*
* @author maxr@google.com (Max Ross)
* @see StatefulInterceptorFactory
*/
public interface RequiresSession {
void setSession(Session session);
}
|
openjdk/jdk8 | 1,172 | langtools/test/tools/javac/diags/examples/RepeatedModifier.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.repeated.modifier
class RepeatedModifier {
public public String toString() { return "??"; }
}
|
openjdk/jdk8 | 1,173 | langtools/test/tools/javac/nio/compileTest/HelloPathWorld.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.
*/
class HelloPathWorld {
public static void main(String... args) {
System.out.println("Hello World!");
}
}
|
openjdk/jdk8 | 1,174 | langtools/test/tools/javac/diags/examples/ReportAccess.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.report.access
class ReportAccess {
int i = new Other().x;
}
class Other {
private int x;
}
|
openjdk/jdk8 | 1,182 | jdk/test/jdk/lambda/separate/ClassFilePreprocessor.java | /*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package separate;
public interface ClassFilePreprocessor {
public byte[] preprocess(String name, byte[] classfile);
};
|
openjdk/jtreg | 1,187 | test/share/basic/lib/jtreg/SkippedException.java | /*
* Copyright (c) 2024, 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 jtreg;
public class SkippedException extends Exception {
public SkippedException(String msg) {
super(msg);
}
} |
openjdk/jtreg | 1,204 | test/6527624/B/BadB1.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 A-only
*/
public class BadB1 {
public static void main(String[] args) {
throw new Error("should not happen");
}
}
|
openjdk/jtreg | 1,204 | test/6527624/B/BadB2.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 BadB2 {
public static void main(String[] args) {
throw new Error("should not happen");
}
}
|
oracle/fastr | 1,145 | com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RForeignVectorWrapper.java | /*
* Copyright (c) 2017, 2019, 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 3 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 3 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
* 3 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 com.oracle.truffle.r.runtime.data;
public interface RForeignVectorWrapper {
}
|
oracle/nosql | 1,167 | kvmain/src/main/java/oracle/kv/impl/param/DefaultParameter.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.param;
public class DefaultParameter {
public Object create(String name, String defaultValue,
ParameterState.Type type) {
return Parameter.createParameter(name, defaultValue, type);
}
public static Parameter getDefaultParameter(ParameterState ps) {
return (Parameter) ps.getDefaultParameter();
}
public static Parameter getDefaultParameter(String name) {
ParameterState state = ParameterState.lookup(name);
if (state != null) {
return DefaultParameter.getDefaultParameter(state);
}
throw new IllegalArgumentException("No such parameter: " + name);
}
}
|
oracle/nosql | 1,175 | kvmain/src/main/java/oracle/kv/table/BinaryDef.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.table;
/**
* BinaryDef is an extension of {@link FieldDef} to encapsulate a Binary type.
* There is no instance-specific state at this time.
*
* @since 3.0
*/
public interface BinaryDef extends FieldDef {
/**
* @return a deep copy of this object.
*/
@Override
public BinaryDef clone();
/**
* Creates a BinaryValue instance from a String. The String must be a
* Base64 encoded string returned from {@link BinaryValue#toString}.
*
* @return a String representation of the value
*
* @throws IllegalArgumentException if the string cannot be decoded
*/
public BinaryValue fromString(String encodedString);
}
|
oracle/oci-java-sdk | 1,155 | bmc-common/src/main/java/com/oracle/bmc/util/internal/NameUtils.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.util.internal;
/** Utility functions related to naming */
public enum NameUtils {
; // prevent instantiation
/**
* Canonicalizes a name for use in enum types. This specifically is for enum ids (values) that
* matched the enum name except were lower case and used hyphen delimiters vs upper case and
* underscores (enum naming convention)
*
* @param name The un-canonicalized name.
* @return The canonicalized name.
*/
public static String canonicalizeForEnumTypes(final String name) {
return name.toUpperCase().replaceAll("-", "_");
}
/** Convert enum type name to un-canonicalized name * */
public static String decanonicalizeFromEnumTypes(final String name) {
return name.toLowerCase().replaceAll("_", "-");
}
}
|
apache/commons-validator | 1,146 | src/main/java/org/apache/commons/validator/routines/checkdigit/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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This package contains <em>Check Digit</em> validation/calculation routines.
* <p>
* Note that these <strong>do not validate</strong> the input for length or syntax. Such validation is performed by the org.apache.commons.validator.routines.XYZValidator
* classes.
* </p>
*/
package org.apache.commons.validator.routines.checkdigit; |
apache/cxf | 1,136 | rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/DelegatingHandlerChainBuilder.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.jaxws.handler;
import java.util.List;
import jakarta.xml.ws.handler.Handler;
import org.apache.cxf.jaxws.handler.types.PortComponentHandlerType;
@SuppressWarnings("rawtypes")
@FunctionalInterface
interface DelegatingHandlerChainBuilder {
List<Handler> buildHandlerChain(PortComponentHandlerType ht);
}
|
apache/cxf | 1,138 | systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleAdapter.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.systest.type_substitution;
import jakarta.xml.bind.annotation.adapters.XmlAdapter;
public class AppleAdapter extends XmlAdapter<Apple, Fruit> {
public Fruit unmarshal(Apple v) throws Exception {
return v;
}
public Apple marshal(Fruit v) throws Exception {
return (Apple)v;
}
} |
apache/cxf | 1,160 | core/src/test/java/org/apache/cxf/helpers/UnMarkedInputStream.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.helpers;
import java.io.ByteArrayInputStream;
public class UnMarkedInputStream extends ByteArrayInputStream {
public UnMarkedInputStream(byte[] buf) {
super(buf);
}
@Override
public boolean markSupported() {
return false;
}
@Override
public int available() {
return 0;
}
}
|
apache/cxf | 1,167 | core/src/main/java/org/apache/cxf/logging/NoOpFaultListener.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.logging;
import org.apache.cxf.message.Message;
/**
* Utility FaultListener for blocking the default PhaseInterceptorChain fault logging
*/
public class NoOpFaultListener implements FaultListener {
@Override
public boolean faultOccurred(Exception exception, String description, Message message) {
return false;
}
}
|
apache/deltaspike | 1,106 | deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc002/PageBean002.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.uc002;
import org.apache.deltaspike.core.api.config.view.ViewConfig;
import jakarta.enterprise.inject.Model;
@Model
class PageBean002
{
public Class<? extends ViewConfig> actionMethod()
{
return Pages.Index.class;
}
}
|
apache/deltaspike | 1,112 | deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/spi/authorization/SecurityStrategy.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.security.spi.authorization;
import org.apache.deltaspike.core.spi.InterceptorStrategy;
/**
* Marker interface for a pluggable strategy for
* {@link org.apache.deltaspike.security.api.authorization.Secured}
*/
public interface SecurityStrategy extends InterceptorStrategy
{
}
|
apache/deltaspike | 1,133 | deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/util/CustomException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.api.util;
class CustomException extends Exception
{
private static final long serialVersionUID = 6197126259870336328L;
CustomException(String message)
{
super(message);
}
CustomException(String message, Throwable cause)
{
super(message, cause);
}
}
|
apache/directmemory | 1,122 | serializers/kryo/src/test/java/org/apache/directmemory/serialization/kryo/KryoSerializerTest.java | package org.apache.directmemory.serialization.kryo;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.directmemory.test.AbstractSerializerTest;
/**
*
*/
public class KryoSerializerTest
extends AbstractSerializerTest
{
@Override
public String getSerializerClassName()
{
return KryoSerializer.class.getName();
}
}
|
apache/directory-kerby | 1,130 | kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/util/Nonce.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.kerby.kerberos.kerb.crypto.util;
import java.security.SecureRandom;
public class Nonce {
private static SecureRandom srand = new SecureRandom();
public static synchronized int value() {
int value = srand.nextInt();
return value & 0x7fffffff;
}
}
|
apache/dolphinscheduler | 1,080 | dolphinscheduler-extract/dolphinscheduler-extract-master/src/main/java/org/apache/dolphinscheduler/extract/master/IMasterContainerService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.master;
import org.apache.dolphinscheduler.extract.base.RpcMethod;
import org.apache.dolphinscheduler.extract.base.RpcService;
@RpcService
public interface IMasterContainerService {
@RpcMethod
void refreshWorkerGroup();
}
|
apache/dolphinscheduler | 1,127 | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/repository/ProjectDao.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.dao.repository;
import org.apache.dolphinscheduler.dao.entity.Project;
import java.util.Collection;
import java.util.List;
public interface ProjectDao extends IDao<Project> {
List<Project> queryByCodes(Collection<Long> projectCodes);
Project queryByCode(Long projectCode);
}
|
apache/drill | 1,137 | exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/UnsupportedDataTypeException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.work.foreman;
public class UnsupportedDataTypeException extends SqlUnsupportedException {
public UnsupportedDataTypeException(String drillJiraNumber, String message) {
super(drillJiraNumber, message);
}
public UnsupportedDataTypeException(String errorMessage) {
super(errorMessage);
}
}
|
apache/drill | 1,137 | exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/UnsupportedFunctionException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.work.foreman;
public class UnsupportedFunctionException extends SqlUnsupportedException {
public UnsupportedFunctionException(String drillJiraNumber, String message) {
super(drillJiraNumber, message);
}
public UnsupportedFunctionException(String errorMessage) {
super(errorMessage);
}
}
|
apache/drill | 1,154 | drill-yarn/src/main/java/org/apache/drill/yarn/client/ClientException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.yarn.client;
public class ClientException extends Exception {
private static final long serialVersionUID = 1L;
public ClientException(String msg) {
super(msg);
}
public ClientException(String msg, Exception e) {
super(msg, e);
}
public ClientException(Exception e) {
super(e.getMessage(), e);
}
}
|
apache/druid | 1,130 | processing/src/test/java/org/apache/druid/query/operator/NaivePartitioningOperatorFactoryTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.query.operator;
import nl.jqno.equalsverifier.EqualsVerifier;
import org.junit.Test;
public class NaivePartitioningOperatorFactoryTest
{
@Test
public void testEquals()
{
EqualsVerifier.forClass(NaivePartitioningOperatorFactory.class)
.usingGetClass()
.verify();
}
}
|
apache/dubbo-spi-extensions | 1,074 | dubbo-serialization-extensions/dubbo-serialization-test/src/main/java/org/apache/dubbo/common/serialize/model/BizExceptionNoDefaultConstructor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.common.serialize.model;
public class BizExceptionNoDefaultConstructor extends RuntimeException {
private static final long serialVersionUID = 1L;
public BizExceptionNoDefaultConstructor(String message) {
super(message);
}
}
|
apache/dubbo | 1,135 | dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/RevisionResolver.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.metadata;
import org.apache.dubbo.common.utils.MD5Utils;
public class RevisionResolver {
public static final String EMPTY_REVISION = "0";
private static MD5Utils md5Utils = new MD5Utils();
public static String calRevision(String metadata) {
return md5Utils.getMd5(metadata);
}
}
|
apache/eagle | 1,115 | eagle-core/eagle-metadata/eagle-metadata-base/src/main/java/org/apache/eagle/metadata/model/MetadataEntityRepository.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.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.eagle.metadata.model;
import org.apache.eagle.log.entity.repo.EntityRepository;
public class MetadataEntityRepository extends EntityRepository {
public MetadataEntityRepository() {
registerEntity(AlertEntity.class);
registerEntity(MetricSchemaEntity.class);
}
} |
apache/eventmesh | 1,106 | eventmesh-connectors/eventmesh-connector-jdbc/src/main/java/org/apache/eventmesh/connector/jdbc/event/EventConsumer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.connector.jdbc.event;
/**
* Functional interface for consuming events.
*/
@FunctionalInterface
public interface EventConsumer {
/**
* Accepts a snapshot event.
*
* @param event the snapshot event to be consumed
*/
void accept(Event event);
}
|
apache/felix-dev | 1,090 | dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/api/Storage.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.dependencymanager.samples.dynamicdep.api;
import java.io.Serializable;
/**
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
*/
public interface Storage {
Serializable get(String key);
void store(String key, Serializable data);
}
|
apache/fineract | 1,106 | fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryReadPlatformService.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.organisation.provisioning.service;
import java.util.List;
import org.apache.fineract.organisation.provisioning.data.ProvisioningCategoryData;
public interface ProvisioningCategoryReadPlatformService {
List<ProvisioningCategoryData> retrieveAllProvisionCategories();
}
|
apache/fineract | 1,121 | fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/OverAppliedCalculationType.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.data;
public enum OverAppliedCalculationType {
PERCENTAGE("percentage"), //
FIXED_SIZE("flat"); //
public final String value;
OverAppliedCalculationType(String value) {
this.value = value;
}
public String getValue() {
return value;
}
}
|
apache/fineract | 1,137 | fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeRepository.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.infrastructure.codes.domain;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
public interface CodeRepository extends JpaRepository<Code, Long>, JpaSpecificationExecutor<Code> {
Code findOneByName(String name);
}
|
apache/flink | 1,120 | flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/expressions/UnresolvedException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.planner.expressions;
import org.apache.flink.annotation.Internal;
/** Exception for unwanted method calling on unresolved expression. */
@Internal
public class UnresolvedException extends RuntimeException {
public UnresolvedException(String msg) {
super(msg);
}
}
|
apache/flink | 1,133 | flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/ConnectionErrorMessage.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.runtime.io.network.netty;
/** Message for indicating connection error. */
public class ConnectionErrorMessage {
private final Throwable cause;
public ConnectionErrorMessage(Throwable cause) {
this.cause = cause;
}
public Throwable getCause() {
return cause;
}
}
|
apache/fluss | 1,148 | fluss-common/src/main/java/org/apache/fluss/metadata/DataLakeFormat.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.fluss.metadata;
/** An enum for datalake format. */
public enum DataLakeFormat {
PAIMON("paimon"),
LANCE("lance"),
ICEBERG("iceberg");
private final String value;
DataLakeFormat(String value) {
this.value = value;
}
@Override
public String toString() {
return value;
}
}
|
apache/freemarker | 1,126 | freemarker-jython25/src/test/java/freemarker/core/subpkg/PublicWithMixedConstructors.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package freemarker.core.subpkg;
public class PublicWithMixedConstructors {
private final String s;
public PublicWithMixedConstructors(Integer x) {
s = "Integer";
}
PublicWithMixedConstructors(int x) {
s = "int";
}
public String getS() {
return s;
}
}
|
apache/geode | 1,158 | geode-core/src/main/java/org/apache/geode/distributed/internal/MQueue.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.geode.distributed.internal;
import java.util.concurrent.BlockingQueue;
/**
* The <code>MQueue</code> interface allows us to have multiple implementations of the distribution
* manager's message queue.
*/
public interface MQueue extends BlockingQueue {
/**
* Signals the semaphore on which this queue is waiting.
*/
void wakeUp();
}
|
apache/giraph | 1,145 | giraph-core/src/main/java/org/apache/giraph/types/FloatWritableToDoubleUnwrapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.giraph.types;
import org.apache.hadoop.io.FloatWritable;
/**
* Converts FloatWritables to Doubles
*/
public class FloatWritableToDoubleUnwrapper
implements WritableUnwrapper<FloatWritable, Double> {
@Override
public Double unwrap(FloatWritable writableValue) {
return (double) writableValue.get();
}
}
|
apache/gobblin | 1,151 | gobblin-utility/src/test/java/org/apache/gobblin/util/DatePartitionTypeTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.util;
import org.testng.Assert;
import org.testng.annotations.Test;
public class DatePartitionTypeTest {
@Test
public void testGetMillis() {
Assert.assertEquals(DatePartitionType.MINUTE.getUnitMilliseconds(), 60000L);
Assert.assertEquals(DatePartitionType.HOUR.getUnitMilliseconds(), 60 * 60 * 1000L);
}
}
|
apache/gobblin | 1,166 | gobblin-api/src/main/java/gobblin/configuration/State.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package gobblin.configuration;
import java.util.Properties;
/***
* Shim layer for org.apache.gobblin.configuration.State
*/
public class State extends org.apache.gobblin.configuration.State {
public State() {
super();
}
public State(Properties properties) {
super(properties);
}
public State(State otherState) {
super(otherState);
}
}
|
apache/grails-core | 1,128 | grails-forge/grails-forge-api/src/main/java/org/grails/forge/api/options/SelectOptionsOperations.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.grails.forge.api.options;
import org.grails.forge.api.RequestInfo;
import org.grails.forge.api.SelectOptionsDTO;
import io.swagger.v3.oas.annotations.Parameter;
public interface SelectOptionsOperations {
SelectOptionsDTO selectOptions(@Parameter(hidden = true) RequestInfo serverURL);
}
|
apache/griffin | 1,155 | service/src/test/java/org/apache/griffin/core/util/PredicatorMock.java | /*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
package org.apache.griffin.core.util;
import org.apache.griffin.core.job.Predicator;
import org.apache.griffin.core.job.entity.SegmentPredicate;
import java.io.IOException;
public class PredicatorMock implements Predicator {
public PredicatorMock(SegmentPredicate segmentPredicate) {
}
@Override
public boolean predicate() throws IOException {
return true;
}
}
|
apache/groovy | 1,149 | src/main/java/org/codehaus/groovy/reflection/GroovyClassValue.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.reflection;
/** Abstraction for Java version dependent ClassValue implementations.
* @see java.lang.ClassValue
*
* @param <T>
*/
public interface GroovyClassValue<T> {
interface ComputeValue<T>{
T computeValue(Class<?> type);
}
T get(Class<?> type);
void remove(Class<?> type);
}
|
apache/guacamole-client | 1,146 | guacamole-ext/src/main/java/org/apache/guacamole/net/event/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 classes for storing information about events that are
* triggered when users log into and use the Guacamole web application.
* These event classes are most useful when used with hooks implemented
* using listener classes.
*
* @see org.apache.guacamole.net.event.listener
*/
package org.apache.guacamole.net.event;
|
apache/hadoop-mapreduce | 1,163 | src/java/org/apache/hadoop/mapreduce/JobPriority.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
/**
* Used to describe the priority of the running job.
*
*/
@InterfaceAudience.Public
@InterfaceStability.Evolving
public enum JobPriority {
VERY_HIGH,
HIGH,
NORMAL,
LOW,
VERY_LOW;
}
|
apache/harmony | 1,118 | drlvm/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/parser/InterimConstructorGenericDecl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.harmony.lang.reflect.parser;
/**
* @author Serguei S. Zapreyev
*/
public final class InterimConstructorGenericDecl implements InterimGenericDeclaration {
public InterimType methodParameters[];
public InterimType throwns[];
public InterimTypeParameter typeParameters[];
} |
apache/harmony | 1,123 | drlvm/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/ReflectPermissionCollection.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.harmony.lang.reflect;
import java.lang.reflect.ReflectPermission;
/**
* @author Evgueni Brevnov, Roman S. Bushmanov
*/
public interface ReflectPermissionCollection {
ReflectPermission SUPPRESS_ACCESS_CHECKS_PERMISSION = new ReflectPermission(
"suppressAccessChecks");
}
|
apache/harmony | 1,139 | classlib/modules/sound/src/main/java/javax/sound/sampled/UnsupportedAudioFileException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package javax.sound.sampled;
public class UnsupportedAudioFileException extends Exception {
private static final long serialVersionUID = -139127412623160368L;
public UnsupportedAudioFileException() {
super();
}
public UnsupportedAudioFileException(String message) {
super(message);
}
}
|
apache/harmony | 1,144 | classlib/modules/awt/src/main/java/common/java/awt/print/PrinterAbortException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @author Igor A. Pyankov
*/
package java.awt.print;
public class PrinterAbortException extends PrinterException {
private static final long serialVersionUID = 4725169026278854136L;
public PrinterAbortException() {
super();
}
public PrinterAbortException(String msg) {
super(msg);
}
}
|
apache/harmony | 1,160 | classlib/modules/sound/src/main/java/javax/sound/midi/Instrument.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package javax.sound.midi;
public abstract class Instrument extends SoundbankResource {
private Patch patch;
protected Instrument(Soundbank soundbank, Patch patch, String name, Class<?> dataClass) {
super(soundbank, name, dataClass);
this.patch = patch;
}
public Patch getPatch() {
return patch;
}
}
|
apache/harmony | 1,183 | drlvm/src/test/regression/H3285/Test.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.harmony.drlvm.tests.regression.h3285;
import junit.framework.TestCase;
public class Test extends TestCase {
public void test() throws Exception {
process(123L);
}
void process(long ll) {
boolean flag = false;
if(ll >= 0L && ll > 0L && ll > 10L)
{
flag = true;
}
}
}
|
apache/helix | 1,160 | helix-core/src/main/java/org/apache/helix/ControllerChangeListener.java | package org.apache.helix;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* Interface to implement to respond to controller changes.
*
* @deprecated
* NOTE: This interface definition is moved to {@link org.apache.helix.api.listeners.ControllerChangeListener}
*/
@Deprecated
public interface ControllerChangeListener extends
org.apache.helix.api.listeners.ControllerChangeListener{
}
|
apache/hive | 1,135 | ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/hashtable/VectorMapJoinLongHashTable.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hive.ql.exec.vector.mapjoin.hashtable;
/*
* Interface for a vector map join hash table (which could be a hash map, hash multi-set, or
* hash set) for a single long.
*/
public interface VectorMapJoinLongHashTable extends VectorMapJoinHashTable {
boolean useMinMax();
long min();
long max();
} |
apache/iceberg | 1,160 | arrow/src/main/java/org/apache/iceberg/arrow/ArrowAllocation.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iceberg.arrow;
import org.apache.arrow.memory.RootAllocator;
public class ArrowAllocation {
static {
ROOT_ALLOCATOR = new RootAllocator(Long.MAX_VALUE);
}
private static final RootAllocator ROOT_ALLOCATOR;
private ArrowAllocation() {}
public static RootAllocator rootAllocator() {
return ROOT_ALLOCATOR;
}
}
|
apache/iceberg | 1,165 | core/src/main/java/org/apache/iceberg/expressions/Zorder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iceberg.expressions;
import java.util.Arrays;
import java.util.List;
public class Zorder implements Term {
private final NamedReference<?>[] refs;
public Zorder(List<NamedReference<?>> refs) {
this.refs = refs.toArray(new NamedReference[0]);
}
public List<NamedReference<?>> refs() {
return Arrays.asList(refs);
}
}
|
apache/ignite | 1,089 | modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQueryROSelfTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.replicated;
/**
*/
public class IgniteCacheReplicatedFieldsQueryROSelfTest extends IgniteCacheReplicatedFieldsQuerySelfTest {
/** */
@Override protected boolean isReplicatedOnly() {
return true;
}
}
|
apache/ignite | 1,121 | modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/scanners/GridDeploymentFileHandler.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.deployment.uri.scanners;
import java.io.File;
/**
* File handler interface. It somehow handles given file.
*/
public interface GridDeploymentFileHandler {
/**
* Processes given file.
*
* @param file File to be handled.
*/
public void handle(File file);
}
|
apache/ignite | 1,128 | docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/services/MyCounterService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.snippets.services;
import javax.cache.CacheException;
public interface MyCounterService {
/**
* Increment counter value and return the new value.
*/
int increment() throws CacheException;
/**
* Get current counter value.
*/
int get() throws CacheException;
}
|
apache/incubator-gluten | 1,141 | gluten-flink/runtime/src/main/java/org/apache/gluten/util/PlanNodeIdGenerator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.gluten.util;
import java.util.concurrent.atomic.AtomicInteger;
/** Generate a unique id for each velox PlanNode */
public class PlanNodeIdGenerator {
private static final AtomicInteger ID_COUNTER = new AtomicInteger(0);
public static String newId() {
return String.valueOf(ID_COUNTER.getAndIncrement());
}
}
|
apache/incubator-heron | 1,145 | heron/downloaders/src/java/org/apache/heron/downloader/HttpDownloader.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.heron.downloader;
import java.net.URI;
import java.net.URL;
import java.nio.file.Path;
public class HttpDownloader implements Downloader {
@Override
public void download(URI uri, Path destination) throws Exception {
final URL url = uri.toURL();
Extractor.extract(url.openStream(), destination);
}
}
|
apache/incubator-hugegraph-computer | 1,111 | computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/input/InputTestSuite.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS 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.computer.core.input;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
InputSplitTest.class,
FileInputSplitTest.class,
InputSplitDataTest.class,
HugeConverterTest.class
})
public class InputTestSuite {
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.