code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
protected void processLAandLI(File archive, RepositoryResourceWritable resource,
Manifest manifest) throws RepositoryException, IOException {
Attributes attribs = manifest.getMainAttributes();
String LAHeader = attribs.getValue(LA_HEADER_PRODUCT);
String LIHeade... | java |
public List<String> getRequiresFeature(ArtifactMetadata amd) {
// Now check we have non-null input. I would like to check for valid
// features
// but as these may be user created I cannot find any way to do this so
// it
// is important there are no typos in the requires featur... | java |
protected void processIcons(ArtifactMetadata amd, RepositoryResourceWritable res) throws RepositoryException {
String current = "";
String sizeString = "";
String iconName = "";
String iconNames = amd.getIcons();
if (iconNames != null) {
iconNames.replaceAll("\\s", "... | java |
public void reconstitute(
MessageProcessor processor,
HashMap durableSubscriptionsTable,
int startMode) throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "reconstitute",
new Object[] { processor, durableSubscriptionsTable, Int... | java |
public void registerLink() throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "registerLink");
// Tell TRM that the link exists
try
{
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
SibTr.debug(tc, "Regis... | java |
public void deregisterLink()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "deregisterLink");
//Deregister the link with TRM
deregisterDestination();
// Tell TRM that the link should be undefined
if (TraceComponent.isAnyTracingEnabled() && tc.isDebu... | java |
public void stop(int mode) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "stop");
super.stop(mode);
// Signal the MQLink component to stop
try
{
if(_mqLinkObject != null)
_mqLinkObject.stop();
}
catch (SIReso... | java |
public void announceMPStarted(
int startMode,
JsMessagingEngine me) throws SIResourceException, SIException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(
tc,
"announceMPStarted",
new Object[] {
startMode,
me });
... | java |
public void destroy() throws SIResourceException, SIException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(
tc,
"destroy");
// Drive destroy against the associated MQLink object
if(_mqLinkObject != null)
_mqLinkObject.destroy();
... | java |
void recycle() {
flushed = false;
closed = false;
out = null;
nextChar = 0;
converterBuffer.clear(); //PM19500
response = null; //PM23029
} | java |
public final void clear() throws IOException {
if ((bufferSize == 0) && (out != null))
// clear() is illegal after any unbuffered output (JSP.5.5)
throw new IllegalStateException("jsp.error.ise_on_clear");
if (flushed)
throw new IOException("jsp.error.attempt_to_clea... | java |
public static File[] getUserExtensionVersionFiles(File installDir) {
File[] versionFiles = null;
String userDirLoc = System.getenv(BootstrapConstants.ENV_WLP_USER_DIR);
File userDir = (userDirLoc != null) ? new File(userDirLoc) : ((installDir != null) ? new File(installDir, "usr") : null);
... | java |
private String getUserFromUniqueID(String id) {
if (id == null) {
return "";
}
id = id.trim();
int realmDelimiterIndex = id.indexOf("/");
if (realmDelimiterIndex < 0) {
return "";
} else {
return id.substring(realmDelimiterIndex + 1);
... | java |
private void checkNotClosed() throws SIConnectionUnavailableException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "checkNotClosed");
//Synchronize on the closed object to prevent it being changed while we check it.
synchronized (this)
... | java |
void removeBrowserSession(BrowserSessionImpl browser)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "removeBrowserSession", browser);
synchronized (_browsers)
{
_browsers.remove(browser);
}
if (TraceComponent.isAny... | java |
void removeConsumerSession(ConsumerSessionImpl consumer)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "removeConsumerSession", consumer);
synchronized (_consumers)
{
_consumers.remove(consumer);
}
_messageProcess... | java |
void removeProducerSession(ProducerSessionImpl producer)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "removeProducerSession");
synchronized (_producers)
{
_producers.remove(producer);
}
if (TraceComponent.isAnyTra... | java |
private ProducerSession internalCreateProducerSession(
SIDestinationAddress destAddress,
DestinationType destinationType,
boolean system,
... | java |
private void checkTemporary(DestinationHandler destination, boolean mqinterop)
throws SITemporaryDestinationNotFoundException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "checkTemporary", new Object[] { destination, Boolean.valueOf(mqin... | java |
private ConsumerSession internalCreateConsumerSession(
SIDestinationAddress destAddr,
String alternateUser,
DestinationType destinationType,
... | java |
private SIBUuid8 checkDurableSubscriptionInformation(String subscriptionName,
String durableSubscriptionHome,
SIDestinationAddress destinationAddress,
... | java |
private SIBusMessage internalReceiveNoWait(SITransaction tran,
Reliability unrecoverableReliability,
SIDestinationAddress destAddr,
DestinationType destinationType,
... | java |
private BrowserSession createBrowserSession(
SIDestinationAddress destinationAddress,
DestinationType destinationType,
SelectionCriteria criteria,
... | java |
private static final boolean isDestinationPrefixValid(String destinationPrefix)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "isDestinationPrefixValid", destinationPrefix);
boolean isValid = true; // Assume the prefix is valid until we know otherwise... | java |
@Override
public ItemStream getMQLinkPubSubBridgeItemStream(String mqLinkUuidStr)
throws SIException
{
MQLinkHandler mqLinkHandler = null;
ItemStream mqLinkPubSubBridgeItemStream = null;
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Sib... | java |
void removeBifurcatedConsumerSession(BifurcatedConsumerSessionImpl bifurcatedConsumer)
{
if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled())
SibTr.entry(CoreSPIConnection.tc, "removeBifurcatedConsumerSession",
new Object[] { this, bifurcated... | java |
private boolean checkConsumerDiscriminatorAccess(DestinationHandler destination,
String discriminator,
SecurityContext secContext)
throws SIDiscriminatorSyntaxException
{
if (TraceC... | java |
private void checkInquireAuthority(DestinationHandler destination,
String destinationName,
String busName,
SecurityContext secContext,
boolean temporary)
... | java |
private boolean isSIBServerSubject()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "isSIBServerSubject");
boolean ispriv = false;
if (_subject != null)
ispriv = _messageProcessor.getAuthorisationUtils().isSIBServerSubject(_subjec... | java |
@Override
public boolean isMulticastEnabled()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "isMulticastEnabled");
boolean enabled = _messageProcessor.isMulticastEnabled();
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())... | java |
@Override
public MulticastProperties getMulticastProperties()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getMulticastProperties");
MulticastProperties props = _messageProcessor.getMulticastProperties();
if (TraceComponent.isAnyTracin... | java |
private void checkDestinationAccess(DestinationHandler destination,
String destinationName,
String busName,
SecurityContext secContext)
throws SINotAuthorizedException
{
... | java |
@Override
public MPSubscription getSubscription(String subscriptionName)
throws SIDurableSubscriptionNotFoundException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(
tc,
"getSubscription",
... | java |
@Override
public void deregisterConsumerSetMonitor(
ConsumerSetChangeCallback callback)
throws SINotPossibleInCurrentConfigurationException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(
... | java |
public Map getConnectionProperties()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
{
SibTr.entry(tc, "getConnectionProperties");
SibTr.exit(tc, "getConnectionProperties", _connectionProperties);
}
return _connectionProperties;
} | java |
public void setConnectionProperties(Map connectionProperties)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
{
SibTr.entry(tc, "getConnectionProperties", connectionProperties);
SibTr.exit(tc, "getConnectionProperties");
}
_connectionPropert... | java |
private void stopChain(String name, Event event) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
Tr.event(tc, "Stop chain event; chain=" + name);
}
ChannelFramework cf = ChannelFrameworkFactory.getChannelFramework();
try {
if (cf.isChainRunnin... | java |
private static WebServiceRefPartialInfo buildPartialInfoFromWebServiceClient(Class<?> serviceInterfaceClass) {
WebServiceClient webServiceClient = serviceInterfaceClass.getAnnotation(WebServiceClient.class);
if (webServiceClient == null) {
return null;
}
String className = s... | java |
public Map<ConfigID, List<T>> collectElementsById(Map<ConfigID, List<T>> map, String defaultId, String pid) {
if (map == null) {
map = new HashMap<ConfigID, List<T>>();
}
int index = 0;
for (T configElement : configElements) {
String id = configElement.getId();
... | java |
public static long readLong(byte b[], int offset) {
long retValue;
retValue = ((long)b[offset++]) << 56;
retValue |= ((long)b[offset++] & 0xff) << 48;
retValue |= ((long)b[offset++] & 0xff) << 40;
retValue |= ((long)b[offset++] & 0xff) << 32;
retValue |= ((long)b[offset++] & 0xff) << 24;
re... | java |
public static void writeLong(byte b[], int offset, long value) {
b[offset++] = (byte) (value >>> 56);
b[offset++] = (byte) (value >>> 48);
b[offset++] = (byte) (value >>> 40);
b[offset++] = (byte) (value >>> 32);
b[offset++] = (byte) (value >>> 24);
b[offset++] = (byte) (value >>> 16);
b[off... | java |
public static int readInt(byte b[], int offset) {
int retValue;
retValue = ((int)b[offset++]) << 24;
retValue |= ((int)b[offset++] & 0xff) << 16;
retValue |= ((int)b[offset++] & 0xff) << 8;
retValue |= (int)b[offset] & 0xff;
return retValue;
} | java |
public static void writeInt(byte[] b, int offset, int value) {
b[offset++] = (byte) (value >>> 24);
b[offset++] = (byte) (value >>> 16);
b[offset++] = (byte) (value >>> 8);
b[offset] = (byte)value;
} | java |
public static short readShort(byte b[], int offset) {
int retValue;
retValue = b[offset++] << 8;
retValue |= b[offset] & 0xff;
return (short)retValue;
} | java |
public static void writeShort(byte b[], int offset, short value) {
b[offset++] = (byte) (value >>> 8);
b[offset] = (byte)value;
} | java |
public static void establishSSLContext(HttpClient client, int port, LibertyServer server) {
establishSSLContext(client, port, server, null, null, null, null, "TLSv1.2");
} | java |
public final void fireEvent(EventObject evt, EventListenerV visitor){
EventListener[] list = getListenerArray();
for(int i=0; i<list.length; i++){
if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))
logger.logp(Level.FINE, CLASS_NAME,"fireEvent", ... | java |
public final synchronized void addListener(EventListener l) {
if(l ==null) {
throw new IllegalArgumentException("Listener " + l +
" is null");
}
if(listeners == EMPTY_LISTENERS) {
listeners = new EventListener[1];
... | java |
public final synchronized void removeListener(EventListener l) {
if(l ==null) {
throw new IllegalArgumentException("Listener " + l +
" is null");
}
// Is l on the list?
int index = -1;
for(int i = listeners.length-1; i>=... | java |
private ClassLoader getClassLoaderForInterfaces(final ClassLoader loader, final Class<?>[] interfaces) {
if (canSeeAllInterfaces(loader, interfaces)) {
LOG.log(Level.FINE, "current classloader " + loader + " can see all interface");
return loader;
}
String sortedNameFromI... | java |
private Application getMyfacesApplicationInstance()
{
FacesContext facesContext = FacesContext.getCurrentInstance();
if (facesContext != null)
{
ExternalContext externalContext = facesContext.getExternalContext();
if (externalContext != null)
{
... | java |
protected ClassLoader buildClassLoader(final List<URL> urlList, String verifyJarProperty) {
if (libertyBoot) {
// for liberty boot we just use the class loader that loaded this class
return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
@Override
... | java |
public static void enableJava2SecurityIfSet(BootstrapConfig bootProps, List<URL> urlList) {
if (bootProps.get(BootstrapConstants.JAVA_2_SECURITY_PROPERTY) != null) {
NameBasedLocalBundleRepository repo = new NameBasedLocalBundleRepository(bootProps.getInstallRoot());
urlList.add(getJarF... | java |
protected static String getProductInfoDisplayName() {
String result = null;
try {
Map<String, ProductInfo> products = ProductInfo.getAllProductInfo();
StringBuilder builder = new StringBuilder();
for (ProductInfo productInfo : products.values()) {
Prod... | java |
protected Instrumentation getInstrumentation() {
ClassLoader cl = ClassLoader.getSystemClassLoader();
Instrumentation i = findInstrumentation(cl, "com.ibm.ws.kernel.instrument.BootstrapAgent");
if (i == null)
i = findInstrumentation(cl, "wlp.lib.extract.agent.BootstrapAgent");
... | java |
public JspConfiguration createClonedJspConfiguration() {
return new JspConfiguration(configManager, this.getServletVersion(), this.jspVersion, this.isXml, this.isXmlSpecified, this.elIgnored, this.scriptingInvalid(), this.isTrimDirectiveWhitespaces(), this.isDeferredSyntaxAllowedAsLiteral(), this.getTrimDirecti... | java |
public ExpressionFactory getExpressionFactory() {
// lazy init here, sync to avoid race condition
synchronized(this) {
if (expressionFactory == null) {
expressionFactory = ExpressionFactory.newInstance();
}
}
//allow JCDI to w... | java |
protected ClassInfoImpl getDelayableClassInfo(Type type) {
String typeClassName = type.getClassName();
if (tc.isDebugEnabled()) {
// Type 'toString' answers the descriptor;
// show the type class name, too, for clarity.
Tr.debug(tc, MessageFormat.format("[ {0} ] ENT... | java |
public ArrayClassInfo getArrayClassInfo(String typeClassName, Type arrayType) {
ClassInfoImpl elementClassInfo = getDelayableClassInfo(arrayType.getElementType());
return new ArrayClassInfo(typeClassName, elementClassInfo);
} | java |
protected boolean addClassInfo(NonDelayedClassInfo classInfo) {
boolean didAdd;
if (classInfo.isJavaClass()) {
didAdd = basicPutJavaClassInfo(classInfo);
} else if (classInfo.isAnnotationPresent() ||
classInfo.isFieldAnnotationPresent() ||
clas... | java |
protected void addAsFirst(NonDelayedClassInfo classInfo) {
String methodName = "addAsFirst";
boolean doLog = tc.isDebugEnabled();
String useHashText = (doLog ? getHashText() : null);
String useClassHashText = (doLog ? classInfo.getHashText() : null);
if (doLog) {
log... | java |
public void makeFirst(NonDelayedClassInfo classInfo) {
String methodName = "makeFirst";
boolean doLog = tc.isDebugEnabled();
String useHashText = (doLog ? getHashText() : null);
String useClassHashText = (doLog ? classInfo.getHashText() : null);
if (doLog) {
logLinks... | java |
@Override
@FFDCIgnore(MalformedURLException.class)
public URL getResource() {
String useRelPath = getRelativePath();
if ( (zipEntryData == null) || zipEntryData.isDirectory() ) {
useRelPath += "/";
}
URI entryUri = rootContainer.createEntryUri(useRelPath);
i... | java |
@Override
public InputStream getInputStream() throws IOException {
if ( (zipEntryData == null) || zipEntryData.isDirectory() ) {
return null;
}
final ZipFileHandle zipFileHandle = rootContainer.getZipFileHandle(); // throws IOException
ZipFile zipFile = zipFileHandle.op... | java |
@Override
public ArtifactContainer getEnclosingContainer() {
// The enclosing container may be set when the entry is
// created, in which case the enclosing container lock is null
// and is never needed.
//
// The entry can be created in these ways:
//
// ZipF... | java |
public char normalize(char currentChar) {
if (NORMALIZE_UPPER == getNormalization()) {
return toUpper(currentChar);
}
if (NORMALIZE_LOWER == getNormalization()) {
return toLower(currentChar);
}
return currentChar;
} | java |
static public char normalize(char input, int format) {
if (NORMALIZE_LOWER == format) {
return toLower(input);
}
if (NORMALIZE_UPPER == format) {
return toUpper(input);
}
return input;
} | java |
public void init(IFilterConfig filterConfig) throws ServletException
{
try
{
// init the filter instance
_filterState = FILTER_STATE_INITIALIZING;
// LIDB-3598: begin
this._filterConfig = filterConfig;
if(_eventSource != null && _eventSource.hasFilter... | java |
public void destroy() throws ServletException
{
try
{
// destroy the filter instance
_filterState = FILTER_STATE_DESTROYING;
for (int i = 0;(nServicing.get() > 0) && i < 60; i++) {
try {
if (i == 0)
{
logger.logp(Level.INFO, CLASS_NAME,"des... | java |
protected synchronized void activate(ComponentContext cc) {
pipelineRef.activate(cc);
securityServiceRef.activate(cc);
insertJMXSecurityFilter();
} | java |
protected synchronized void deactivate(ComponentContext cc) {
removeJMXSecurityFilter();
pipelineRef.deactivate(cc);
securityServiceRef.deactivate(cc);
} | java |
private void throwAuthzException() throws SecurityException {
SubjectManager subjectManager = new SubjectManager();
String name = "UNAUTHENTICATED";
if (subjectManager.getInvocationSubject() != null) {
name = subjectManager.getInvocationSubject().getPrincipals().iterator().next().get... | java |
protected void setupNotificationArea() throws Throwable {
final String sourceMethod = "setupNotificationArea";
URL notificationsURL = null;
HttpsURLConnection connection = null;
try {
// Get URL for creating a notification area
notificationsURL = serverConnection... | java |
private void sendClosingSignal() {
URL clientURL = null;
HttpsURLConnection connection = null;
try {
// Get the appropriate URL to delete notification client
if (serverConnection.serverVersion >= 4) {
//V4+ clients use /{clientID} to delete the notificatio... | java |
private static Type getAsynchronizedGenericType(Object targetObject) {
if (targetObject instanceof java.util.Collection) {
Class<? extends java.util.Collection> rawType = (Class<? extends Collection>) targetObject.getClass();
Class<?> actualType = Object.class;
if (((java.uti... | java |
@Override
public synchronized FailureScope currentFailureScope() {
if (tc.isEntryEnabled())
Tr.entry(tc, "currentFailureScope", this);
if (_currentFailureScope == null) {
_currentFailureScope = new FileFailureScope();
}
if (tc.isEntryEnabled())
T... | java |
@Override
public void directInitialization(FailureScope failureScope) throws RecoveryFailedException {
if (tc.isEntryEnabled())
Tr.entry(tc, "directInitialization", new Object[] { failureScope, this });
// Use configuration to determine if recovery is local (for z/OS).
final Fai... | java |
public void directTermination(FailureScope failureScope) throws TerminationFailedException {
if (tc.isEntryEnabled())
Tr.entry(tc, "directTermination", new Object[] { failureScope, this });
Tr.info(tc, "CWRLS0014_HALT_PEER_RECOVERY", failureScope.serverName());
// If callbacks are ... | java |
@Override
public void registerRecoveryEventListener(RecoveryEventListener rel) /* @MD19638A */
{
if (tc.isEntryEnabled())
Tr.entry(tc, "registerRecoveryEventListener", rel);
RegisteredRecoveryEventListeners.instance().add(rel);
if (tc.isEntryEnabled())
Tr.exit(t... | java |
@Override
public boolean isHAEnabled() {
if (tc.isEntryEnabled())
Tr.entry(tc, "isHAEnabled");
final boolean haEnabled = Configuration.HAEnabled();
if (tc.isEntryEnabled())
Tr.exit(tc, "isHAEnabled", haEnabled);
return haEnabled;
} | java |
public void registerCallback(UOWScopeCallback callback)
{
if (tc.isEntryEnabled()) Tr.entry(tc, "registerCallback", new Object[]{callback, this});
_callbackManager.addCallback(callback);
if (tc.isEntryEnabled()) Tr.exit(tc, "registerCallback");
} | java |
public void unregisterCallback(UOWScopeCallback callback)
{
if (tc.isEntryEnabled()) Tr.entry(tc, "unregisterCallback", new Object[]{callback, this});
_callbackManager.removeCallback(callback);
if (tc.isEntryEnabled()) Tr.exit(tc, "unregisterCallback");
} | java |
private void connectCommon(Object _udpRequestContextObject) throws IOException {
String localAddress = "*";
int localPort = 0;
Map<Object, Object> vcStateMap = getVirtualConnection().getStateMap();
if (vcStateMap != null) {
//
// Size of the buffer the channel sho... | java |
public String retrieveEndpointName(J2EEName j2eeName) {
for (Entry<String, J2EEName> entry : endpointNameJ2EENameMap.entrySet()) {
if (entry.getValue().equals(j2eeName)) {
return entry.getKey();
}
}
return null;
} | java |
private final void _tryUnlink() {
if (0 >= _cursorCount && _state == LOGICALLY_UNLINKED) {
_previousLink._nextLink = _nextLink;
_nextLink._previousLink = _previousLink;
_previousLink = null;
_nextLink = null;
// Defect 240039
//_parent = nu... | java |
public final Link getNextLink() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
SibTr.entry(this, tc, "getNextLink", _positionString());
}
Link nextLink = null;
LinkedList parent = _parent;
if (null != parent) {
nextLink = _parent.getN... | java |
public void xmlWriteOn(FormattedWriter writer) throws IOException {
String name = "link";
writer.write("<");
writer.write(name);
xmlWriteAttributesOn(writer);
writer.write(" />");
} | java |
@SuppressWarnings("rawtypes")
public void doPostConstruct(Class clazz, List<LifecycleCallback> postConstructs) throws InjectionException {
mainClassName = clazz.getName();
doPostConstruct(clazz, postConstructs, null);
} | java |
public void doPostConstruct(Object instance, List<LifecycleCallback> postConstructs) throws InjectionException {
doPostConstruct(instance.getClass(), postConstructs, instance);
} | java |
public void doPreDestroy(Object instance, List<LifecycleCallback> preDestroy) throws InjectionException {
doPreDestroy(instance.getClass(), preDestroy, instance);
} | java |
@SuppressWarnings("rawtypes")
private void doPostConstruct(Class clazz, List<LifecycleCallback> postConstructs, Object instance) throws InjectionException {
if (!metadataComplete && clazz.getSuperclass() != null) {
doPostConstruct(clazz.getSuperclass(), postConstructs, instance);
}
... | java |
@SuppressWarnings("rawtypes")
public Method getAnnotatedMethod(Class clazz, Class<? extends Annotation> annotationClass) {
Method m = null;
Method[] methods = clazz.getDeclaredMethods();
for (int i = 0; i < methods.length; i++) {
Annotation[] a = methods[i].getAnnotations();
... | java |
@SuppressWarnings({ "rawtypes", "unchecked" })
public void invokeMethod(final Class clazz, final String methodName, final Object instance) {
// instance can be null for the static application main method
AccessController.doPrivileged(new PrivilegedAction() {
@Override
public ... | java |
public String getMethodNameFromDD(List<LifecycleCallback> callbacks, String classname) {
String methodName = null;
for (LifecycleCallback callback : callbacks) {
// lifecycle-callback-class default to the enclosing component class Client
String callbackClassName;
call... | java |
private final void encrypt() throws Exception {
String signStr = Base64Coder.toString(Base64Coder.base64Encode(signature));
String ud = userData.toString();
if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
Tr.event(this, tc, "encrypt: userData" + ud);
}
... | java |
@FFDCIgnore({ BadPaddingException.class, Exception.class })
private final void decrypt() throws InvalidTokenException {
byte[] tokenData;
try {
tokenData = LTPAKeyUtil.decrypt(encryptedBytes.clone(), sharedKey, cipher);
checkTokenBytes(tokenData);
String UTF8Toke... | java |
private final void sign() throws Exception {
String dataStr = this.getUserData().toString();
byte[] data = Base64Coder.getBytes(dataStr);
byte[] signature = sign(data, this.privateKey);
this.setSignature(signature);
} | java |
private final boolean verify() throws Exception {
String dataStr = this.getUserData().toString();
byte[] data = Base64Coder.getBytes(dataStr);
return verify(data, signature, publicKey);
} | java |
public final void validateExpiration() throws TokenExpiredException {
Date d = new Date();
Date expD = new Date(getExpiration());
boolean expired = d.after(expD);
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(this, tc, "Current time = " + d + ", ... | java |
private final void setExpiration(long expirationInMinutes) {
expirationInMilliseconds = System.currentTimeMillis()+ expirationInMinutes * 60 * 1000;
signature = null;
if (userData != null) {
encryptedBytes = null;
userData.addAttribute("expire", Long.toString(expirationInMillise... | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.