buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private void testRejectExpressions1_1_0(final String gav) throws Exception {
final ModelVersion modelVersion = ModelVersion.create(1, 1, 0);
final KernelServicesBuilder builder = createKernelServicesBuilder(LoggingTestEnvironment.getManagementInstance());
// Create the legacy kernel
... | private void testRejectExpressions1_1_0(final String gav) throws Exception {
final ModelVersion modelVersion = ModelVersion.create(1, 1, 0);
final KernelServicesBuilder builder = createKernelServicesBuilder(LoggingTestEnvironment.getManagementInstance());
// Create the legacy kernel
... |
protected void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException {
String name = JcaBootstrapContextDefinition.BootstrapCtxParameters.NAME.getAttribute().resolveModelAttribute(context, model).asString();
String workmanag... | protected void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException {
String name = JcaBootstrapContextDefinition.BootstrapCtxParameters.NAME.getAttribute().resolveModelAttribute(context, model).asString();
String workmanag... |
public void execute(OperationContext context, ModelNode operation)
throws OperationFailedException {
final ModelNode mimetypes = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS).getModel().get(MIME_MAPPING);
if (operation.hasDefined("name") && operation.hasDefined("value")) {
... | public void execute(OperationContext context, ModelNode operation)
throws OperationFailedException {
final ModelNode mimetypes = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS).getModel().get(MIME_MAPPING);
if (operation.hasDefined("name") && operation.hasDefined("value")) {
... |
public void addEntries(ModelNode current, Context context) throws NamingException{
JndiViewOperation.this.addEntries(current, context);
}
});
}
}
... | public void addEntries(ModelNode current, Context context) throws NamingException{
JndiViewOperation.this.addEntries(current, context);
}
});
}
}
... |
private static final MarshallingConfiguration CONFIG;
static {
CONFIG = new MarshallingConfiguration();
try {
final ClassLoader cl = Module.getModuleFromCurrentLoader(ModuleIdentifier.create("org.jboss.as.aggregate")).getClassLoader();
CONFIG.setClassResolver(new SimpleCl... | private static final MarshallingConfiguration CONFIG;
static {
CONFIG = new MarshallingConfiguration();
try {
final ClassLoader cl = Module.getModuleFromDefaultLoader(ModuleIdentifier.create("org.jboss.as.aggregate")).getClassLoader();
CONFIG.setClassResolver(new SimpleCl... |
import org.wildfly.security.manager.GetBooleanAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2013, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free sof... | import org.wildfly.security.manager.GetBooleanAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2013, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free sof... |
import org.wildfly.security.manager.ReadPropertyAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2012, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free s... | import org.wildfly.security.manager.ReadPropertyAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2012, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free s... |
import org.wildfly.security.manager.WritePropertyAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free ... | import org.wildfly.security.manager.WritePropertyAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free ... |
import org.wildfly.security.manager.SetContextClassLoaderAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This ... | import org.wildfly.security.manager.SetContextClassLoaderAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This ... |
import org.wildfly.security.manager.GetClassLoaderAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is f... | import org.wildfly.security.manager.GetClassLoaderAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is f... |
import org.wildfly.security.manager.ReadPropertyAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is fre... | import org.wildfly.security.manager.ReadPropertyAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is fre... |
import org.wildfly.security.manager.GetClassLoaderAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is f... | import org.wildfly.security.manager.GetClassLoaderAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is f... |
import org.wildfly.security.manager.SetContextClassLoaderAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This ... | import org.wildfly.security.manager.SetContextClassLoaderAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This ... |
import org.wildfly.security.manager.GetClassLoaderAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free... | import org.wildfly.security.manager.GetClassLoaderAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free... |
import org.wildfly.security.manager.GetClassLoaderAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is f... | import org.wildfly.security.manager.GetClassLoaderAction;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is f... |
public static NumberFormat getDefaultNumberFormat(final Locale locale) {
final NumberFormat nf = NumberFormat.getInstance(locale);
nf.setMaximumFractionDigits(2);
return nf;
}
| public static NumberFormat getDefaultNumberFormat(final Locale locale) {
final NumberFormat nf = NumberFormat.getInstance(locale);
nf.setMaximumFractionDigits(8);
return nf;
}
|
private String getClassLevelInjectionType(final AnnotationInstance annotation) {
boolean isPC = annotation.name().local().equals("PersistenceContext");
return isPC ? ENTITY_MANAGER_CLASS : ENTITY_MANAGERFACTORY_CLASS;
}
private String getScopedPuName(final DeploymentUnit deploymentUnit, fin... | private String getClassLevelInjectionType(final AnnotationInstance annotation) {
boolean isPC = annotation.name().local().equals("PersistenceContext");
return isPC ? ENTITY_MANAGER_CLASS : ENTITY_MANAGERFACTORY_CLASS;
}
private String getScopedPuName(final DeploymentUnit deploymentUnit, fin... |
public void operationCompleted(ModelNode response) {
finalResultRef.set(response);
}
};
final ModelNode execute = operation.clone();
final PathAddress addr = PathAddress.pathAddress(execute.require(ADDRESS));
if (addr.size() > 0) {
fin... | public void operationCompleted(ModelNode response) {
finalResultRef.set(response);
}
};
final ModelNode execute = operation.clone();
final PathAddress addr = PathAddress.pathAddress(execute.require(ADDRESS));
if (addr.size() > 0) {
fin... |
public void init() {
registerBeanDefinitionParser("annotated-controllers", new AnnotatedControllersBeanDefinitionParser());
}
| public void init() {
registerBeanDefinitionParser("annotation-driven", new AnnotationDrivenBeanDefinitionParser());
}
|
private static final String STANDARD_DEFAULT_CONTEXT_LOADER_CLASS_NAME = "org.springframework.test.context.support.GenericXmlContextLoader";
/**
* TODO Document resolveContextConfigurationAttributes().
*/
static List<ContextConfigurationAttributes> resolveContextConfigurationAttributes(Class<?> clazz) {
Asse... | private static final String STANDARD_DEFAULT_CONTEXT_LOADER_CLASS_NAME = "org.springframework.test.context.support.GenericXmlContextLoader";
/**
* TODO Document resolveContextConfigurationAttributes().
*/
static List<ContextConfigurationAttributes> resolveContextConfigurationAttributes(Class<?> clazz) {
Asse... |
public static boolean wildcardMatch(String filename, String wildcardMatcher, IOCase caseSensitivity) {
if (filename == null && wildcardMatcher == null) {
return true;
}
if (filename == null || wildcardMatcher == null) {
return false;
}
if (caseSensitiv... | public static boolean wildcardMatch(String filename, String wildcardMatcher, IOCase caseSensitivity) {
if (filename == null && wildcardMatcher == null) {
return true;
}
if (filename == null || wildcardMatcher == null) {
return false;
}
if (caseSensitiv... |
private static CSVFormat PRISTINE = new CSVFormat(DISABLED, DISABLED, DISABLED, DISABLED, false, false, null, null);
| private final boolean isEncapsulating;
/**
* Constant char to be used for disabling comments, escapes and encapsulation.
* The value -2 is used because it won't be confused with an EOF signal (-1),
* and because the unicode value FFFE would be encoded as two chars (using surrogates)
* and t... |
package org.apache.commons.math.exception;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache Licen... | package org.apache.commons.math.exception;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache Licen... |
public Resource requireChild(PathElement address) {
final Resource resource = getChild(address);
if (resource == null) {
throw new NoSuchElementException(address.toString());
}
return resource;
}
| public Resource requireChild(PathElement address) {
final Resource resource = getChild(address);
if (resource == null) {
throw new NoSuchResourceException(address);
}
return resource;
}
|
public DefaultOperationDescriptionProvider(final String operationName,
final ResourceDescriptionResolver descriptionResolver,
final DeprecationData deprecationData,
final Attr... | public DefaultOperationDescriptionProvider(final String operationName,
final ResourceDescriptionResolver descriptionResolver,
final DeprecationData deprecationData,
final Attr... |
private void testAttribute(CombinationPolicy combinationPolicy,
StandardRole[] userRoles,
StandardRole[] allowedRoles,
boolean accessExpectation) {
ConstraintFactory constraintFactory = new TestConstraintFactory(al... | private void testAttribute(CombinationPolicy combinationPolicy,
StandardRole[] userRoles,
StandardRole[] allowedRoles,
boolean accessExpectation) {
ConstraintFactory constraintFactory = new TestConstraintFactory(al... |
public void start(StartContext context) throws StartException {
ChannelFactory factory = this.factory.getValue();
try {
this.channel = factory.createChannel(this.id);
if (this.channel.getProtocolStack().findProtocol(STATE_TRANSFER.class, STATE.class, STATE_SOCK.class) != null... | public void start(StartContext context) throws StartException {
ChannelFactory factory = this.factory.getValue();
try {
this.channel = factory.createChannel(this.id);
if (this.channel.getProtocolStack().findProtocol(STATE_TRANSFER.class, STATE.class, STATE_SOCK.class) != null... |
protected ConnectorAttribute() {
super(CommonAttributes.CONNECTOR, CommonAttributes.CONNECTOR, null, OBJECT, true, false, null, RESTART_ALL_SERVICES);
}
| protected ConnectorAttribute() {
super(CommonAttributes.CONNECTOR, CommonAttributes.CONNECTOR, null, OBJECT, true, false, null, null, null, false, new String[] { CommonAttributes.DISCOVERY_GROUP_NAME }, new String[0], RESTART_ALL_SERVICES);
}
|
private JndiEntriesAttribute(final boolean forDestination) {
super(CommonAttributes.ENTRIES_STRING, CommonAttributes.ENTRIES_STRING, false, ModelType.STRING, 1, Integer.MAX_VALUE, new String[0], new String[0], new StringLengthValidator(1), null, false,null,AttributeAccess.Flag.RESTART_ALL_SERVICES);
... | private JndiEntriesAttribute(final boolean forDestination) {
super(CommonAttributes.ENTRIES, CommonAttributes.ENTRIES, false, ModelType.STRING, 1, Integer.MAX_VALUE, new String[0], new String[0], new StringLengthValidator(1), null, false,null,AttributeAccess.Flag.RESTART_ALL_SERVICES);
this.forDesti... |
private static Image jbossIcon;
static {
URL iconURL = GuiMain.class.getResource("/icon/as7_logo.png");
jbossIcon = Toolkit.getDefaultToolkit().getImage(iconURL);
ToolTipManager.sharedInstance().setDismissDelay(15000);
}
| private static Image jbossIcon;
static {
URL iconURL = GuiMain.class.getResource("/icon/as7_logo_32x32x32.png");
jbossIcon = Toolkit.getDefaultToolkit().getImage(iconURL);
ToolTipManager.sharedInstance().setDismissDelay(15000);
}
|
public void handleReturnValue(Object returnValue,
MethodParameter returnType,
ModelAndViewContainer mavContainer,
NativeWebRequest webRequest) throws Exception {
this.unhandledReturnValue = returnValue;
if (returnValue != null) {
mavContainer.addModelAttribute(Conventions.getVari... | public void handleReturnValue(Object returnValue,
MethodParameter returnType,
ModelAndViewContainer mavContainer,
NativeWebRequest webRequest) throws Exception {
this.unhandledReturnValue = returnValue;
if (returnValue != null) {
mavContainer.addAttribute(Conventions.getVariableN... |
private long lexNorm(int[] c) {
long ret = 0;
for (int i = 0; i < c.length; i++) {
final int digit = c[i];
if (digit < 0 ||
digit >= n) {
throw new OutOfRangeException(digit, 0, n - 1);
}
... | private long lexNorm(int[] c) {
long ret = 0;
for (int i = 0; i < c.length; i++) {
final int digit = c[i];
if (digit < 0 ||
digit >= n) {
throw new OutOfRangeException(digit, 0, n - 1);
}
... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final DeploymentUnit parent = Utils.getRootDeploymentUnit(deploymentUnit);
final ServiceTarget serviceTarget = phaseConte... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final DeploymentUnit parent = Utils.getRootDeploymentUnit(deploymentUnit);
final ServiceTarget serviceTarget = phaseConte... |
public boolean isCancelled() {
return cancelledFlag.get();
}
| public boolean isCancelled() {
return done && cancelledFlag.get();
}
|
public Future<String> asyncCancelMethod(CountDownLatch latch, CountDownLatch latch2) throws InterruptedException {
String result;
result = ctx.wasCancelCalled() ? "true" : "false";
latch.countDown();
latch2.await(5, TimeUnit.SECONDS);
result += ";";
... | public Future<String> asyncCancelMethod(CountDownLatch latch, CountDownLatch latch2) throws InterruptedException {
String result;
result = ctx.wasCancelCalled() ? "true" : "false";
latch.countDown();
latch2.await(5, TimeUnit.SECONDS);
result += ";";
... |
private static String getSockJsSessionId(WebSocketSession wsSession) {
Assert.notNull(wsSession, "wsSession is required");
String path = wsSession.getURI().getPath();
String[] segments = StringUtils.tokenizeToStringArray(path, "/");
Assert.isTrue(segments.length > 3, "SockJS request should have at least 3 patg... | private static String getSockJsSessionId(WebSocketSession wsSession) {
Assert.notNull(wsSession, "wsSession is required");
String path = wsSession.getURI().getPath();
String[] segments = StringUtils.tokenizeToStringArray(path, "/");
Assert.isTrue(segments.length > 3, "SockJS request should have at least 3 path... |
public JaasAuthenticationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHENTICATION, ModelDescriptionConstants.JAAS),
ControllerResolver.getResolver("core.management.security-realm.authentication.jaas"),
new SecurityRealmChildAddHandler(true... | public JaasAuthenticationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHENTICATION, ModelDescriptionConstants.JAAS),
ControllerResolver.getResolver("core.management.security-realm.authentication.jaas"),
new SecurityRealmChildAddHandler(true... |
public LdapAuthenticationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHENTICATION, ModelDescriptionConstants.LDAP),
ControllerResolver.getResolver("core.management.security-realm.authentication.ldap"),
new LdapAuthenticationAddHandler(), n... | public LdapAuthenticationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHENTICATION, ModelDescriptionConstants.LDAP),
ControllerResolver.getResolver("core.management.security-realm.authentication.ldap"),
new LdapAuthenticationAddHandler(), n... |
public LocalAuthenticationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHENTICATION, ModelDescriptionConstants.LOCAL),
ControllerResolver.getResolver("core.management.security-realm.authentication.local"),
new SecurityRealmChildAddHandler(t... | public LocalAuthenticationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHENTICATION, ModelDescriptionConstants.LOCAL),
ControllerResolver.getResolver("core.management.security-realm.authentication.local"),
new SecurityRealmChildAddHandler(t... |
public PlugInAuthenticationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHENTICATION, ModelDescriptionConstants.PLUG_IN),
ControllerResolver.getResolver("core.management.security-realm.authentication.plug-in"),
new SecurityRealmChildAddHand... | public PlugInAuthenticationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHENTICATION, ModelDescriptionConstants.PLUG_IN),
ControllerResolver.getResolver("core.management.security-realm.authentication.plug-in"),
new SecurityRealmChildAddHand... |
public PlugInAuthorizationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHORIZATION, ModelDescriptionConstants.PLUG_IN),
ControllerResolver.getResolver("core.management.security-realm.authorization.plug-in"),
new SecurityRealmChildAddHandler... | public PlugInAuthorizationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHORIZATION, ModelDescriptionConstants.PLUG_IN),
ControllerResolver.getResolver("core.management.security-realm.authorization.plug-in"),
new SecurityRealmChildAddHandler... |
public PlugInResourceDefinition() {
super(PathElement.pathElement(PLUG_IN),
ControllerResolver.getResolver("core.management.security-realm.plug-in"),
new SecurityRealmChildAddHandler(true),
new SecurityRealmChildRemoveHandler(true), OperationEntry.Flag.RESTART... | public PlugInResourceDefinition() {
super(PathElement.pathElement(PLUG_IN),
ControllerResolver.getResolver("core.management.security-realm.plug-in"),
new SecurityRealmChildAddHandler(true),
new SecurityRealmChildRemoveHandler(true, false), OperationEntry.Flag.... |
public PropertiesAuthenticationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHENTICATION, ModelDescriptionConstants.PROPERTIES),
ControllerResolver.getResolver("core.management.security-realm.authentication.properties"),
new SecurityRealmCh... | public PropertiesAuthenticationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHENTICATION, ModelDescriptionConstants.PROPERTIES),
ControllerResolver.getResolver("core.management.security-realm.authentication.properties"),
new SecurityRealmCh... |
public PropertiesAuthorizationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHORIZATION, ModelDescriptionConstants.PROPERTIES),
ControllerResolver.getResolver("core.management.security-realm.authorization.properties"),
new SecurityRealmChild... | public PropertiesAuthorizationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHORIZATION, ModelDescriptionConstants.PROPERTIES),
ControllerResolver.getResolver("core.management.security-realm.authorization.properties"),
new SecurityRealmChild... |
public PropertyResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.PROPERTY),
ControllerResolver.getResolver("core.management.security-realm.property"),
new SecurityRealmChildAddHandler(true, VALUE),
new SecurityRealmChildRemoveHandl... | public PropertyResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.PROPERTY),
ControllerResolver.getResolver("core.management.security-realm.property"),
new SecurityRealmChildAddHandler(true, VALUE),
new SecurityRealmChildRemoveHandl... |
public SSLServerIdentityResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.SERVER_IDENTITY, ModelDescriptionConstants.SSL),
ControllerResolver.getResolver("core.management.security-realm.server-identity.ssl"),
new SecurityRealmChildAddHandler(false... | public SSLServerIdentityResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.SERVER_IDENTITY, ModelDescriptionConstants.SSL),
ControllerResolver.getResolver("core.management.security-realm.server-identity.ssl"),
new SecurityRealmChildAddHandler(false... |
public SecretServerIdentityResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.SERVER_IDENTITY, ModelDescriptionConstants.SECRET),
ControllerResolver.getResolver("core", "management", "security-realm", "server-identity", "secret"),
new SecurityRealm... | public SecretServerIdentityResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.SERVER_IDENTITY, ModelDescriptionConstants.SECRET),
ControllerResolver.getResolver("core", "management", "security-realm", "server-identity", "secret"),
new SecurityRealm... |
public TruststoreAuthenticationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHENTICATION, ModelDescriptionConstants.TRUSTSTORE),
ControllerResolver.getResolver("core.management.security-realm.authentication.truststore"),
new SecurityRealmCh... | public TruststoreAuthenticationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHENTICATION, ModelDescriptionConstants.TRUSTSTORE),
ControllerResolver.getResolver("core.management.security-realm.authentication.truststore"),
new SecurityRealmCh... |
public XmlAuthenticationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHENTICATION, ModelDescriptionConstants.USERS),
ControllerResolver.getResolver("core.management.security-realm.authentication.xml"),
new SecurityRealmChildAddHandler(true)... | public XmlAuthenticationResourceDefinition() {
super(PathElement.pathElement(ModelDescriptionConstants.AUTHENTICATION, ModelDescriptionConstants.USERS),
ControllerResolver.getResolver("core.management.security-realm.authentication.xml"),
new SecurityRealmChildAddHandler(true)... |
private String getOutput( final String threadName )
{
final ByteArrayOutputStream output =
m_outputMap.get( threadName );
assertNotNull( "getOutput()", output );
return output.toString();
}
| private String getOutput( final String threadName )
{
final ByteArrayOutputStream output =
m_outputMap.get( threadName );
assertNotNull( "getOutput()", output );
return output.toString(Charsets.UTF_8);
}
|
public void testUPlus() {
UnicodeUnescaper uu = new UnicodeUnescaper();
String input = "\\u+0047";
try {
uu.translate(input);
fail("Default behaviour should not parse u+");
} catch(IllegalArgumentException iae) {
// expected
}
uu ... | public void testUPlus() {
UnicodeUnescaper uu = new UnicodeUnescaper();
String input = "\\u+0047";
try {
uu.translate(input);
fail("Default behaviour should not parse u+");
} catch(IllegalArgumentException iae) {
// expected
}
uu ... |
protected static final AttributeDefinition EXPORT_CORBALOC = new SimpleAttributeDefinitionBuilder(
Constants.NAMING_EXPORT_CORBALOC, ModelType.STRING, true)
.setDefaultValue(AttributeConstants.DEFAULT_ENABLED_PROPERTY).setValidator(AttributeConstants.ON_OFF_VALIDATOR)
.setFlags(A... | protected static final AttributeDefinition EXPORT_CORBALOC = new SimpleAttributeDefinitionBuilder(
Constants.NAMING_EXPORT_CORBALOC, ModelType.STRING, true)
.setDefaultValue(AttributeConstants.TRUE_PROPERTY).setValidator(AttributeConstants.TRUE_FALSE_VALIDATOR)
.setFlags(Attribut... |
package org.springframework.format;
/*
* Copyright 2002-2009 the original author or 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/LI... | package org.springframework.format;
/*
* Copyright 2002-2009 the original author or 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/LI... |
package org.springframework.format;
/*
* Copyright 2002-2009 the original author or 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/LI... | package org.springframework.format;
/*
* Copyright 2002-2009 the original author or 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/LI... |
package org.springframework.format;
/*
* Copyright 2002-2009 the original author or 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/LI... | package org.springframework.format;
/*
* Copyright 2002-2009 the original author or 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/LI... |
package org.springframework.format;
/*
* Copyright 2002-2009 the original author or 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/LI... | package org.springframework.format;
/*
* Copyright 2002-2009 the original author or 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/LI... |
package org.springframework.format;
/*
* Copyright 2002-2009 the original author or 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/LI... | package org.springframework.format;
/*
* Copyright 2002-2009 the original author or 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/LI... |
package org.springframework.format.annotation;
/**
* Annotations for declaratively configuring field formatting rules.
*/
package org.springframework.ui.format.annotation;
| package org.springframework.format.annotation;
/**
* Annotations for declaratively configuring field formatting rules.
*/
package org.springframework.format.annotation;
|
package org.springframework.format.datetime.joda;
/**
* Integration with the Joda Time for formatting Joda types as well as standard JDK Date types.
*/
package org.springframework.ui.format.jodatime;
| package org.springframework.format.datetime.joda;
/**
* Integration with the Joda Time for formatting Joda types as well as standard JDK Date types.
*/
package org.springframework.format.datetime.joda;
|
package org.springframework.format.datetime;
/**
* Formatters for <code>java.util.Date</code> properties.
*/
package org.springframework.ui.format.date;
| package org.springframework.format.datetime;
/**
* Formatters for <code>java.util.Date</code> properties.
*/
package org.springframework.format.datetime;
|
package org.springframework.format.number;
/**
* Formatters for <code>java.lang.Number</code> properties.
*/
package org.springframework.ui.format.number;
| package org.springframework.format.number;
/**
* Formatters for <code>java.lang.Number</code> properties.
*/
package org.springframework.format.number;
|
package org.springframework.format;
/**
* An API for defining Formatters to format field model values for display in a UI.
*/
package org.springframework.ui.format;
| package org.springframework.format;
/**
* An API for defining Formatters to format field model values for display in a UI.
*/
package org.springframework.format;
|
package org.springframework.format.support;
/**
* Support classes for the formatting package,
* providing common implementations as well as adapters.
*/
package org.springframework.ui.format.support;
| package org.springframework.format.support;
/**
* Support classes for the formatting package,
* providing common implementations as well as adapters.
*/
package org.springframework.format.support;
|
private static final ServiceName JBOSS_MESSAGING = ServiceName.JBOSS.append("messaging");
| public static ServiceName getJMSBridgeServiceName(String bridgeName) {
return JBOSS_MESSAGING.append(JMS_BRIDGE).append(bridgeName);
}
} |
public VaultHandler(String keyStore, String keyStorePassword, String keyStoreType, String encodedVaultFileDirectory,
int keySize, String alias, String salt, int iterationCount) {
if (alias != null) {
this.alias = alias;
}
if (keySize != 0) {
this.keySize... | public VaultHandler(String keyStore, String keyStorePassword, String keyStoreType, String encodedVaultFileDirectory,
int keySize, String alias, String salt, int iterationCount) {
if (alias != null) {
this.alias = alias;
}
if (keySize != 0) {
this.keySize... |
public long skip(long numToSkip) throws IOException {
long available = (entrySize - entryOffset);
numToSkip = Math.min(numToSkip, available);
long skipped = IOUtils.skip(is, numToSkip);
count(skipped);
entryOffset += skipped;
return skipped;
}
| public long skip(long numToSkip) throws IOException {
long available = entrySize - entryOffset;
numToSkip = Math.min(numToSkip, available);
long skipped = IOUtils.skip(is, numToSkip);
count(skipped);
entryOffset += skipped;
return skipped;
}
|
public static PatchConfig parse(final InputStream stream) throws XMLStreamException {
try {
final XMLInputFactory inputFactory = INPUT_FACTORY;
setIfSupported(inputFactory, XMLInputFactory.IS_VALIDATING, Boolean.FALSE);
setIfSupported(inputFactory, XMLInputFactory.SUPPORT... | public static PatchConfig parse(final InputStream stream) throws XMLStreamException {
try {
final XMLInputFactory inputFactory = INPUT_FACTORY;
setIfSupported(inputFactory, XMLInputFactory.IS_VALIDATING, Boolean.FALSE);
setIfSupported(inputFactory, XMLInputFactory.SUPPORT... |
public String usage(String headline) {
final StringBuilder sb = new StringBuilder();
sb.append(NEW_LINE).append(UsageMessages.MESSAGES.argUsage(headline)).append(NEW_LINE);
for (int i = 0; i < arguments.size(); i++) {
sb.append(getCommand(i)).append(NEW_LINE);
}
... | public String usage(String headline) {
final StringBuilder sb = new StringBuilder();
sb.append(NEW_LINE).append(headline).append(NEW_LINE);
for (int i = 0; i < arguments.size(); i++) {
sb.append(getCommand(i)).append(NEW_LINE);
}
return sb.toString();
}
|
protected void exposeActionException(PortletRequest request, StateAwareResponse response, Exception ex) {
// Copy all parameters unless overridden in the action handler.
Enumeration<String> paramNames = request.getParameterNames();
while (paramNames.hasMoreElements()) {
String paramName = paramNames.nextEleme... | protected void exposeActionException(PortletRequest request, StateAwareResponse response, Exception ex) {
// Copy all parameters unless overridden in the action handler.
Enumeration<String> paramNames = request.getParameterNames();
while (paramNames.hasMoreElements()) {
String paramName = paramNames.nextEleme... |
protected void finishBeanFactoryInitialization(ConfigurableListableBeanFactory beanFactory) {
// Initialize conversion service for this context.
if (beanFactory.containsBean(CONVERSION_SERVICE_BEAN_NAME) &&
beanFactory.isTypeMatch(CONVERSION_SERVICE_BEAN_NAME, ConversionService.class)) {
beanFactory.setConv... | protected void finishBeanFactoryInitialization(ConfigurableListableBeanFactory beanFactory) {
// Initialize conversion service for this context.
if (beanFactory.containsBean(CONVERSION_SERVICE_BEAN_NAME) &&
beanFactory.isTypeMatch(CONVERSION_SERVICE_BEAN_NAME, ConversionService.class)) {
beanFactory.setConv... |
public String decodeRequestString(HttpServletRequest request, String source) {
if (this.urlDecode) {
String enc = determineEncoding(request);
try {
return URLDecoder.decode(source, enc);
}
catch (UnsupportedEncodingException ex) {
if (logger.isWarnEnabled()) {
logger.warn("Could not decode r... | public String decodeRequestString(HttpServletRequest request, String source) {
if (this.urlDecode) {
String enc = determineEncoding(request);
try {
return UriUtils.decode(source, enc);
}
catch (UnsupportedEncodingException ex) {
if (logger.isWarnEnabled()) {
logger.warn("Could not decode req... |
private static void usage() {
System.out.println("Usage: ./run.sh [args...]\n");
System.out.println("where args include:");
System.out.println(" -D<name>[=<value>] Set a system property");
System.out.println(" -help Display this message an... | private static void usage() {
System.out.println("Usage: ./run.sh [args...]\n");
System.out.println("where args include:");
System.out.println(" -D<name>[=<value>] Set a system property");
System.out.println(" -help Display this message an... |
public Object processInvocation(InterceptorContext context) throws Exception {
final EJBComponent component = getComponent(context, EJBComponent.class);
// create the instance
final ComponentInstance componentInstance = component.createInstance();
context.putPrivateData(ComponentInst... | public Object processInvocation(InterceptorContext context) throws Exception {
final EJBComponent component = getComponent(context, EJBComponent.class);
// create the instance
final ComponentInstance componentInstance = component.createInstance();
context.putPrivateData(ComponentInst... |
public Object intercept(InvocationContext context) throws Exception {
if (!context.getMethod().getName().equals("echo")) {
return context.proceed();
}
return "#BeanParent#" + context.proceed();
}
} | public Object interceptParent(InvocationContext context) throws Exception {
if (!context.getMethod().getName().equals("echo")) {
return context.proceed();
}
return "#BeanParent#" + context.proceed();
}
} |
public String echo(String s) {
log.info("-----> In test()");
log.info("-----> Found BeanWithSimpleInjected, calling echo(\"Test\")");
final BeanWithSimpleInjected bean = LookupService.bean;
s = bean.echo(s);
if(bean.getSimple() == null) {
throw new RuntimeExceptio... | public String echo(String s) {
log.info("-----> In test()");
log.info("-----> Found BeanWithSimpleInjected, calling echo(\"Test\")");
final BeanWithSimpleInjected bean = LookupService.getBean();
s = bean.echo(s);
if(bean.getSimple() == null) {
throw new RuntimeExc... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (!WeldDeploymentMarker.isPartOfWeldDeployment(deploymentUnit)) {
return;
}
if (deploymentUnit.ge... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (!WeldDeploymentMarker.isPartOfWeldDeployment(deploymentUnit)) {
return;
}
if (deploymentUnit.ge... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final DeploymentUnit parent = deploymentUnit.getParent() == null ? deploymentUnit : deploymentUnit.getParent();
final Ser... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final DeploymentUnit parent = deploymentUnit.getParent() == null ? deploymentUnit : deploymentUnit.getParent();
final Ser... |
public double getValue(final double[] point) {
return coefficients.dotProduct(point) + constantTerm;
}
| public double getValue(final double[] point) {
return coefficients.dotProduct(new ArrayRealVector(point, false)) + constantTerm;
}
|
public void commit() {
long lastCompletedOffset = lastCompletedOffset();
if (_committedTo != lastCompletedOffset) {
LOG.debug("Writing last completed offset (" + lastCompletedOffset + ") to ZK for " + _partition + " for topology: " + _topologyInstanceId);
Map<Object, Object> ... | public void commit() {
long lastCompletedOffset = lastCompletedOffset();
if (lastCompletedOffset != lastCompletedOffset) {
LOG.debug("Writing last completed offset (" + lastCompletedOffset + ") to ZK for " + _partition + " for topology: " + _topologyInstanceId);
Map<Object, O... |
protected void assertConflicts(CommandLineException e, String... conflicts) {
final StringBuilder buf = new StringBuilder();
buf.append("Conflicts detected: ");
int i = 0;
while(i < conflicts.length) {
buf.append(conflicts[i++].replace('\\', '/')); // fix paths on windows... | protected void assertConflicts(CommandLineException e, String... conflicts) {
final StringBuilder buf = new StringBuilder();
buf.append("Conflicts detected: ");
int i = 0;
while(i < conflicts.length) {
buf.append(conflicts[i++].replace('\\', '/')); // fix paths on windows... |
public Collection<ApplicationListener> getApplicationListeners() {
LinkedList<ApplicationListener> allListeners = new LinkedList<ApplicationListener>();
for (ApplicationListener listener : this.applicationListeners) {
allListeners.add(listener);
}
if (!this.applicationListenerBeans.isEmpty()) {
Be... | public Collection<ApplicationListener> getApplicationListeners() {
LinkedList<ApplicationListener> allListeners = new LinkedList<ApplicationListener>();
for (ApplicationListener listener : this.applicationListeners) {
allListeners.add(listener);
}
if (!this.applicationListenerBeans.isEmpty()) {
Be... |
protected AnnotationMetadata doProcessConfigurationClass(
ConfigurationClass configClass, AnnotationMetadata metadata) throws IOException {
// recursively process any member (nested) classes first
for (String memberClassName : metadata.getMemberClassNames()) {
MetadataReader reader = this.metadataReaderFact... | protected AnnotationMetadata doProcessConfigurationClass(
ConfigurationClass configClass, AnnotationMetadata metadata) throws IOException {
// recursively process any member (nested) classes first
for (String memberClassName : metadata.getMemberClassNames()) {
MetadataReader reader = this.metadataReaderFact... |
* public Date create() {
* return new Date();
* }
* }
* Map<String, Date> lazy = LazyMap.lazyMap(new HashMap<String, Date>(), factory);
* Date date = lazy.get("NOW");
* </pre>
*
* After the above code is executed, <code>date</code> will refer to
* a new <code>Date</code> instance. ... | * public Date create() {
* return new Date();
* }
* }
* Map<String, Date> lazy = LazyMap.lazyMap(new HashMap<String, Date>(), factory);
* Date date = lazy.get("NOW");
* </pre>
*
* After the above code is executed, <code>date</code> will refer to
* a new <code>Date</code> instance. ... |
public static boolean isSupported(final String name) {
if (name == null) {
return false;
}
try {
return Charset.isSupported(name);
} catch (IllegalCharsetNameException ex) {
return false;
}
}
| public static boolean isSupported(final String name) {
if (name == null) {
return false;
}
try {
return Charset.isSupported(name);
} catch (final IllegalCharsetNameException ex) {
return false;
}
}
|
public int translate(final CharSequence input, final int index, final Writer out) throws IOException {
if(index != 0) {
throw new IllegalStateException("CsvUnescaper should never reach the [1] index");
}
if ( input.charAt(0) != CSV_QUOTE || input.charAt(inpu... | public int translate(final CharSequence input, final int index, final Writer out) throws IOException {
if(index != 0) {
throw new IllegalStateException("CsvUnescaper should never reach the [1] index");
}
if ( input.charAt(0) != CSV_QUOTE || input.charAt(inpu... |
private static String getSystemProperty(final String property) {
try {
return System.getProperty(property);
} catch (SecurityException ex) {
// we are not allowed to look at this property
System.err.println("Caught a SecurityException reading the system property '... | private static String getSystemProperty(final String property) {
try {
return System.getProperty(property);
} catch (final SecurityException ex) {
// we are not allowed to look at this property
System.err.println("Caught a SecurityException reading the system prop... |
public boolean equals(final Object other) {
if (!(other instanceof IDKey)) {
return false;
}
IDKey idKey = (IDKey) other;
if (id != idKey.id) {
return false;
}
// Note that identity equals is used.
... | public boolean equals(final Object other) {
if (!(other instanceof IDKey)) {
return false;
}
final IDKey idKey = (IDKey) other;
if (id != idKey.id) {
return false;
}
// Note that identity equals is used.
... |
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof ConstantInitializer<?>)) {
return false;
}
ConstantInitializer<?> c = (ConstantInitializer<?>) obj;
return ObjectUtils.equals(getObject(), c.getOb... | public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof ConstantInitializer<?>)) {
return false;
}
final ConstantInitializer<?> c = (ConstantInitializer<?>) obj;
return ObjectUtils.equals(getObject(), c... |
public TimedSemaphore(final ScheduledExecutorService service, final long timePeriod,
final TimeUnit timeUnit, final int limit) {
if (timePeriod <= 0) {
throw new IllegalArgumentException("Time period must be greater 0!");
}
period = timePeriod;
unit = timeUni... | public TimedSemaphore(final ScheduledExecutorService service, final long timePeriod,
final TimeUnit timeUnit, final int limit) {
if (timePeriod <= 0) {
throw new IllegalArgumentException("Time period must be greater 0!");
}
period = timePeriod;
unit = timeUni... |
public int compareTo(final MutableBoolean other) {
boolean anotherVal = other.value;
return value == anotherVal ? 0 : (value ? 1 : -1);
}
| public int compareTo(final MutableBoolean other) {
final boolean anotherVal = other.value;
return value == anotherVal ? 0 : (value ? 1 : -1);
}
|
public int compareTo(final MutableByte other) {
byte anotherVal = other.value;
return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1);
}
| public int compareTo(final MutableByte other) {
final byte anotherVal = other.value;
return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1);
}
|
public int compareTo(final MutableFloat other) {
float anotherVal = other.value;
return Float.compare(value, anotherVal);
}
| public int compareTo(final MutableFloat other) {
final float anotherVal = other.value;
return Float.compare(value, anotherVal);
}
|
public int compareTo(final MutableInt other) {
int anotherVal = other.value;
return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1);
}
| public int compareTo(final MutableInt other) {
final int anotherVal = other.value;
return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1);
}
|
public int compareTo(final MutableLong other) {
long anotherVal = other.value;
return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1);
}
| public int compareTo(final MutableLong other) {
final long anotherVal = other.value;
return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1);
}
|
public boolean equals(final Object obj) {
if (obj == null) {
return false;
}
if (this == obj) {
return true;
}
if (this.getClass() == obj.getClass()) {
MutableObject<?> that = (MutableObject<?>) obj;
return this.value.equals(tha... | public boolean equals(final Object obj) {
if (obj == null) {
return false;
}
if (this == obj) {
return true;
}
if (this.getClass() == obj.getClass()) {
final MutableObject<?> that = (MutableObject<?>) obj;
return this.value.equa... |
public int compareTo(final MutableShort other) {
short anotherVal = other.value;
return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1);
}
| public int compareTo(final MutableShort other) {
final short anotherVal = other.value;
return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1);
}
|
public int isMatch(final char[] buffer, int pos, final int bufferStart, final int bufferEnd) {
int len = chars.length;
if (pos + len > bufferEnd) {
return 0;
}
for (int i = 0; i < chars.length; i++, pos++) {
if (chars[i] != buffer[p... | public int isMatch(final char[] buffer, int pos, final int bufferStart, final int bufferEnd) {
final int len = chars.length;
if (pos + len > bufferEnd) {
return 0;
}
for (int i = 0; i < chars.length; i++, pos++) {
if (chars[i] != bu... |
public static String[][] invert(final String[][] array) {
String[][] newarray = new String[array.length][2];
for(int i = 0; i<array.length; i++) {
newarray[i][0] = array[i][1];
newarray[i][1] = array[i][0];
}
| public static String[][] invert(final String[][] array) {
final String[][] newarray = new String[array.length][2];
for(int i = 0; i<array.length; i++) {
newarray[i][0] = array[i][1];
newarray[i][1] = array[i][0];
}
|
protected String toUtf16Escape(final int codepoint) {
char[] surrogatePair = Character.toChars(codepoint);
return "\\u" + hex(surrogatePair[0]) + "\\u" + hex(surrogatePair[1]);
}
| protected String toUtf16Escape(final int codepoint) {
final char[] surrogatePair = Character.toChars(codepoint);
return "\\u" + hex(surrogatePair[0]) + "\\u" + hex(surrogatePair[1]);
}
|
public int translate(final CharSequence input, final int index, final Writer out) throws IOException {
if(input.charAt(index) == '\\' && index < (input.length() - 1) && Character.isDigit(input.charAt(index + 1)) ) {
int start = index + 1;
int end = index + 2;
while ( end... | public int translate(final CharSequence input, final int index, final Writer out) throws IOException {
if(input.charAt(index) == '\\' && index < (input.length() - 1) && Character.isDigit(input.charAt(index + 1)) ) {
final int start = index + 1;
int end = index + 2;
while... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.