private static void emptyImplementationWarning(Ruby runtime, ID id, String name) { runtime.getWarnings().warnOnce(id, name + " does nothing on JRuby"); } }
private static void emptyImplementationWarning(Ruby runtime, ID id, String name) { runtime.getWarnings().warnOnce(id, name + " does nothing on JRuby"); } }
private static void emptyImplementationWarning(Ruby runtime, ID id, String name) { runtime.getWarnings().warnOnce(id, name + " does nothing on JRuby"); }
private static void emptyImplementationWarning(Ruby runtime, ID id, String name) { runtime.getWarnings().warnOnce(id, name + " does nothing on JRuby"); }
@Override public IRubyObject set(IRubyObject value) { runtime.getWarnings().warnOnce(ID.SAFE_NOT_SUPPORTED, "SAFE levels are not supported in JRuby"); return RubyFixnum.zero(runtime); } }
@Override public IRubyObject set(IRubyObject value) { runtime.getWarnings().warnOnce(ID.SAFE_NOT_SUPPORTED, "SAFE levels are not supported in JRuby"); return RubyFixnum.zero(runtime); } }
@Override public IRubyObject set(IRubyObject value) { runtime.getWarnings().warnOnce(ID.SAFE_NOT_SUPPORTED, "SAFE levels are not supported in JRuby"); return RubyFixnum.zero(runtime); } }
@Override public IRubyObject set(IRubyObject value) { runtime.getWarnings().warnOnce(ID.SAFE_NOT_SUPPORTED, "SAFE levels are not supported in JRuby"); return RubyFixnum.zero(runtime); } }
@JRubyMethod(name = "listen") public IRubyObject listen(ThreadContext context, IRubyObject backlog) { context.runtime.getWarnings().warnOnce( IRubyWarnings.ID.LISTEN_SERVER_SOCKET, "pass backlog to #bind instead of #listen (http://wiki.jruby.org/ServerSocket)"); return context.runtime.newFixnum(0); }
@JRubyMethod(name = "listen") public IRubyObject listen(ThreadContext context, IRubyObject backlog) { context.runtime.getWarnings().warnOnce( IRubyWarnings.ID.LISTEN_SERVER_SOCKET, "pass backlog to #bind instead of #listen (http://wiki.jruby.org/ServerSocket)"); return context.runtime.newFixnum(0); }
@JRubyMethod(name = "listen") public IRubyObject listen(ThreadContext context, IRubyObject backlog) { context.runtime.getWarnings().warnOnce( IRubyWarnings.ID.LISTEN_SERVER_SOCKET, "pass backlog to #bind instead of #listen (http://wiki.jruby.org/ServerSocket)"); return context.runtime.newFixnum(0); }
@JRubyMethod(name = "listen") public IRubyObject listen(ThreadContext context, IRubyObject backlog) { context.runtime.getWarnings().warnOnce( IRubyWarnings.ID.LISTEN_SERVER_SOCKET, "pass backlog to #bind instead of #listen (http://wiki.jruby.org/ServerSocket)"); return context.runtime.newFixnum(0); }
public void addProfiledMethod(String name, DynamicMethod method ) { final long serial = method.getSerialNumber(); if (getMethods().size() >= getProfileMaxMethods()) { getWarnings().warnOnce(IRubyWarnings.ID.PROFILE_MAX_METHODS_EXCEEDED, "method count exceeds max of " + getConfig().getProfileMaxMethods() + "; no new methods will be profiled"); return; } getMethods().putIfAbsent(serial, new ProfiledMethod(name, method)); }
public void addProfiledMethod(String name, DynamicMethod method ) { final long serial = method.getSerialNumber(); if (getMethods().size() >= getProfileMaxMethods()) { getWarnings().warnOnce(IRubyWarnings.ID.PROFILE_MAX_METHODS_EXCEEDED, "method count exceeds max of " + getConfig().getProfileMaxMethods() + "; no new methods will be profiled"); return; } getMethods().putIfAbsent(serial, new ProfiledMethod(name, method)); }
/** * Add a method, so it can be printed out later. * * @param name the name of the method * @param method */ void addProfiledMethod(final String name, final DynamicMethod method) { if (!config.isProfiling()) return; if (method.isUndefined()) return; final int index = (int) method.getSerialNumber(); if (index >= config.getProfileMaxMethods()) { warnings.warnOnce(ID.PROFILE_MAX_METHODS_EXCEEDED, "method count exceeds max of " + config.getProfileMaxMethods() + "; no new methods will be profiled"); return; } synchronized(this) { if (profiledMethods.length <= index) { int newSize = Math.min((int) index * 2 + 1, config.getProfileMaxMethods()); ProfiledMethod[] newProfiledMethods = new ProfiledMethod[newSize]; System.arraycopy(profiledMethods, 0, newProfiledMethods, 0, profiledMethods.length); profiledMethods = newProfiledMethods; } // only add the first one we encounter, since others will probably share the original if (profiledMethods[index] == null) { profiledMethods[index] = new ProfiledMethod(name, method); } } }
private void confirmCachedProxy(String message) { final RubyClass realClass = metaClass.getRealClass(); if ( ! realClass.getCacheProxy() ) { final Ruby runtime = getRuntime(); if (Java.OBJECT_PROXY_CACHE) { runtime.getWarnings().warnOnce(IRubyWarnings.ID.NON_PERSISTENT_JAVA_PROXY, MessageFormat.format(message, realClass)); } else { runtime.getWarnings().warn(MessageFormat.format(message, realClass)); realClass.setCacheProxy(true); runtime.getJavaSupport().getObjectProxyCache().put(getObject(), this); } } }
private void confirmCachedProxy(String message) { final RubyClass realClass = metaClass.getRealClass(); if ( ! realClass.getCacheProxy() ) { final Ruby runtime = getRuntime(); if (Java.OBJECT_PROXY_CACHE) { runtime.getWarnings().warnOnce(IRubyWarnings.ID.NON_PERSISTENT_JAVA_PROXY, MessageFormat.format(message, realClass)); } else { runtime.getWarnings().warn(MessageFormat.format(message, realClass)); realClass.setCacheProxy(true); runtime.getJavaSupport().getObjectProxyCache().put(getObject(), this); } } }
/** * Add a method, so it can be printed out later. * * @param name the name of the method * @param method */ void addProfiledMethod(final String name, final DynamicMethod method) { if (!config.isProfiling()) return; if (method.isUndefined()) return; final int index = (int) method.getSerialNumber(); if (index >= config.getProfileMaxMethods()) { warnings.warnOnce(ID.PROFILE_MAX_METHODS_EXCEEDED, "method count exceeds max of " + config.getProfileMaxMethods() + "; no new methods will be profiled"); return; } synchronized(this) { if (profiledMethods.length <= index) { int newSize = Math.min((int) index * 2 + 1, config.getProfileMaxMethods()); ProfiledMethod[] newProfiledMethods = new ProfiledMethod[newSize]; System.arraycopy(profiledMethods, 0, newProfiledMethods, 0, profiledMethods.length); profiledMethods = newProfiledMethods; } // only add the first one we encounter, since others will probably share the original if (profiledMethods[index] == null) { profiledMethods[index] = new ProfiledMethod(name, method); } } }
private void confirmCachedProxy(String message) { RubyClass realClass = metaClass.getRealClass(); if (!realClass.getCacheProxy()) { if (Java.OBJECT_PROXY_CACHE) { getRuntime().getWarnings().warnOnce(IRubyWarnings.ID.NON_PERSISTENT_JAVA_PROXY, MessageFormat.format(message, realClass)); } else { getRuntime().getWarnings().warn(MessageFormat.format(message, realClass)); realClass.setCacheProxy(true); getRuntime().getJavaSupport().getObjectProxyCache().put(getObject(), this); } } }
private void confirmCachedProxy(String message) { RubyClass realClass = metaClass.getRealClass(); if (!realClass.getCacheProxy()) { if (Java.OBJECT_PROXY_CACHE) { getRuntime().getWarnings().warnOnce(IRubyWarnings.ID.NON_PERSISTENT_JAVA_PROXY, MessageFormat.format(message, realClass)); } else { getRuntime().getWarnings().warn(MessageFormat.format(message, realClass)); realClass.setCacheProxy(true); getRuntime().getJavaSupport().getObjectProxyCache().put(getObject(), this); } } }