rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
throws NotImplementedException | public void removeConsumer(ImageConsumer consumer) { } | |
throws NotImplementedException | public void requestTopDownLeftRightResend(ImageConsumer consumer) { } | |
throws NotImplementedException | public void run() { } | |
throws NotImplementedException | public void setRenderContext(RenderContext context) { } | |
throws NotImplementedException | public void startProduction(ImageConsumer consumer) { } | |
if (toolkit instanceof ClasspathToolkit) ((ClasspathToolkit)toolkit).registerImageIOSpis(this); | private IIORegistry() { super(defaultCategories.iterator()); // XXX: Register built-in Spis here. Toolkit toolkit = Toolkit.getDefaultToolkit(); registerApplicationClasspathSpis(); } | |
InputStream stream; | public static Iterator lookupProviders(Class spi, ClassLoader loader) { InputStream stream; String resourceName; Enumeration urls; if (spi == null) throw new IllegalArgumentException(); if (loader == null) loader = ClassLoader.getSystemClassLoader(); ... | |
descriptors = loadDescriptors(pluginFiles); | this.extensionPoints = new BootableHashMap(); this.descriptorMap = new BootableHashMap(); loadDescriptors(pluginFiles); | public PluginRegistryModel(URL[] pluginFiles) throws PluginException { descriptors = loadDescriptors(pluginFiles); resolveDescriptors(); } |
return new ObjectArrayIterator(descriptors); | return descriptorMap.values().iterator(); | public Iterator getDescriptorIterator() { return new ObjectArrayIterator(descriptors); } |
return (ExtensionPoint) getExtensionPointsCache().get(id); | return (ExtensionPoint) extensionPoints.get(id); | public ExtensionPoint getExtensionPoint(String id) { return (ExtensionPoint) getExtensionPointsCache().get(id); } |
final int max = descriptors.length; for (int i = 0; i < max; i++) { if (descriptors[i].getId().equals(pluginId)) { return descriptors[i]; } } return null; | return (PluginDescriptor) descriptorMap.get(pluginId); | public PluginDescriptor getPluginDescriptor(String pluginId) { final int max = descriptors.length; for (int i = 0; i < max; i++) { if (descriptors[i].getId().equals(pluginId)) { return descriptors[i]; } } return null; } |
private PluginDescriptorModel[] loadDescriptors(URL[] pluginFiles) throws PluginException { final int max = pluginFiles.length; final PluginDescriptorModel[] list = new PluginDescriptorModel[max]; | private void loadDescriptors(URL[] pluginUrls) throws PluginException { final int max = pluginUrls.length; | private PluginDescriptorModel[] loadDescriptors(URL[] pluginFiles) throws PluginException { final int max = pluginFiles.length; final PluginDescriptorModel[] list = new PluginDescriptorModel[max]; for (int i = 0; i < max; i++) { final URL url = pluginFiles[i]; //reader.setValidation(true); //reader.setValidat... |
final URL url = pluginFiles[i]; final XMLElement root; try { root = new XMLElement(new Hashtable(), true, false); final Reader r = new InputStreamReader(url.openStream()); try { root.parseFromReader(r); } finally { r.close(); } } catch (IOException ex) { throw new PluginException(ex); } if (!root.getName().equals("p... | loadPlugin(pluginUrls[i]); | private PluginDescriptorModel[] loadDescriptors(URL[] pluginFiles) throws PluginException { final int max = pluginFiles.length; final PluginDescriptorModel[] list = new PluginDescriptorModel[max]; for (int i = 0; i < max; i++) { final URL url = pluginFiles[i]; //reader.setValidation(true); //reader.setValidat... |
return list; | private PluginDescriptorModel[] loadDescriptors(URL[] pluginFiles) throws PluginException { final int max = pluginFiles.length; final PluginDescriptorModel[] list = new PluginDescriptorModel[max]; for (int i = 0; i < max; i++) { final URL url = pluginFiles[i]; //reader.setValidation(true); //reader.setValidat... | |
protected void registerExtensionPoint(ExtensionPoint ep) throws PluginException { final HashMap epMap = getExtensionPointsCache(); | protected synchronized void registerExtensionPoint(ExtensionPoint ep) throws PluginException { final BootableHashMap epMap = this.extensionPoints; | protected void registerExtensionPoint(ExtensionPoint ep) throws PluginException { final HashMap epMap = getExtensionPointsCache(); if (epMap.containsKey(ep.getUniqueIdentifier())) { throw new PluginException("Duplicate extension point " + ep.getUniqueIdentifier()); } epMap.put(ep.getUniqueIdentifier(), ep); } |
final int max = descriptors.length; for (int i = 0; i < max; i++) { descriptors[i].resolve(); | for (Iterator i = descriptorMap.values().iterator(); i.hasNext(); ) { final PluginDescriptorModel descr = (PluginDescriptorModel)i.next(); descr.resolve(); | private void resolveDescriptors() throws PluginException { final int max = descriptors.length; for (int i = 0; i < max; i++) { descriptors[i].resolve(); } } |
public PluginDescriptorModel(PluginRegistryModel registry, XMLElement e) throws PluginException { this.registry = registry; id = getAttribute(e, "id", true); name = getAttribute(e, "name", true); providerName = getAttribute(e, "provider-name", false); version = getAttribute(e, "version", true); className = getAttribute... | public PluginDescriptorModel(XMLElement e) throws PluginException { this(null, null, e); | public PluginDescriptorModel(PluginRegistryModel registry, XMLElement e) throws PluginException { this.registry = registry; id = getAttribute(e, "id", true); name = getAttribute(e, "name", true); providerName = getAttribute(e, "provider-name", false); version = getAttribute(e, "version", true); className = getAt... |
while (true) { mutex.lock(); | boolean loop = true; final Address lcAddr = getLCAddress(); while (loop) { final VmThread current = VmMagic.currentProcessor().getCurrentThread(); | private final void enterSlowPath() { // No yet owner, try to obtain the lock while (true) { // Lock this monitor first mutex.lock(); // Try to claim this monitor if (getLCAddress().attempt(0, 1)) { // Success, we now own this monit... |
if (getLCAddress().attempt(0, 1)) { this.owner = VmMagic.currentProcessor().currentThread; mutex.unlock(); return; | if (lcAddr.attempt(0, 1)) { loop = false; this.owner = current; | private final void enterSlowPath() { // No yet owner, try to obtain the lock while (true) { // Lock this monitor first mutex.lock(); // Try to claim this monitor if (getLCAddress().attempt(0, 1)) { // Success, we now own this monit... |
final VmThread current = VmMagic.currentProcessor().currentThread; | private final void enterSlowPath() { // No yet owner, try to obtain the lock while (true) { // Lock this monitor first mutex.lock(); // Try to claim this monitor if (getLCAddress().attempt(0, 1)) { // Success, we now own this monit... | |
VmMagic.currentProcessor().disableReschedule(false, null); current.goSleepByMonitor(this, object, null, VmThread.WAITING_ENTER); enterQueue.enqueue(current, false); | lock(); try { VmMagic.currentProcessor().disableReschedule(true); prepareWait(current, enterQueue, VmThread.WAITING_ENTER, "mon-enter"); } finally { unlock(); } | private final void enterSlowPath() { // No yet owner, try to obtain the lock while (true) { // Lock this monitor first mutex.lock(); // Try to claim this monitor if (getLCAddress().attempt(0, 1)) { // Success, we now own this monit... |
mutex.unlock(); VmMagic.currentProcessor().suspend(false, null); | VmMagic.currentProcessor().suspend(true); | private final void enterSlowPath() { // No yet owner, try to obtain the lock while (true) { // Lock this monitor first mutex.lock(); // Try to claim this monitor if (getLCAddress().attempt(0, 1)) { // Success, we now own this monit... |
int count = 0; | public final void lock() { if (this.owner == VmMagic.currentProcessor()) { // We already own this lock, increment the lock count. lockCount = lockCount.add(Word.one()); } else { final Address ownerAddr = ObjectReference.fromObject(this) .toAddress();... | |
if (++count > 10000) { VmMagic.currentProcessor().getArchitecture().getStackReader().debugStackTrace(); Unsafe.die("ProcessorLock.lock"); } | public final void lock() { if (this.owner == VmMagic.currentProcessor()) { // We already own this lock, increment the lock count. lockCount = lockCount.add(Word.one()); } else { final Address ownerAddr = ObjectReference.fromObject(this) .toAddress();... | |
while (x < len) { int ch = in.read(); if (ch == '0') { in.read(); | while (x < len) { int ch = in.read (); if (ch == '0') { in.read (); byteStr[0] = (char) in.read (); byteStr[1] = (char) in.read (); | static public int[] getScanline(Reader in, int len) throws IOException { char byteStr[] = new char[2]; int scanline[] = new int[len]; int x = 0; while (x < len) { int ch = in.read(); if (ch == '0') { in.read(); // 'x' byteStr[0] = (char) in.read(); byteStr[1] = (char) in.read(); int byteVal = Integ... |
byteStr[0] = (char) in.read(); byteStr[1] = (char) in.read(); | int byteVal = Integer.parseInt (new String (byteStr), 16); | static public int[] getScanline(Reader in, int len) throws IOException { char byteStr[] = new char[2]; int scanline[] = new int[len]; int x = 0; while (x < len) { int ch = in.read(); if (ch == '0') { in.read(); // 'x' byteStr[0] = (char) in.read(); byteStr[1] = (char) in.read(); int byteVal = Integ... |
int byteVal = Integer.parseInt(new String(byteStr), 16); | for (int i = 0; i < 8; i++, x++) { if (x == len) return scanline; | static public int[] getScanline(Reader in, int len) throws IOException { char byteStr[] = new char[2]; int scanline[] = new int[len]; int x = 0; while (x < len) { int ch = in.read(); if (ch == '0') { in.read(); // 'x' byteStr[0] = (char) in.read(); byteStr[1] = (char) in.read(); int byteVal = Integ... |
for (int i = 0; i < 8; i++, x++) { if (x == len) return scanline; | scanline[x] = ((byteVal & masktable[i]) != 0) ? black : transparent; } } } | static public int[] getScanline(Reader in, int len) throws IOException { char byteStr[] = new char[2]; int scanline[] = new int[len]; int x = 0; while (x < len) { int ch = in.read(); if (ch == '0') { in.read(); // 'x' byteStr[0] = (char) in.read(); byteStr[1] = (char) in.read(); int byteVal = Integ... |
scanline[x] = ((byteVal & masktable[i]) != 0) ? black : transparent; } } } return scanline; } | return scanline; } | static public int[] getScanline(Reader in, int len) throws IOException { char byteStr[] = new char[2]; int scanline[] = new int[len]; int x = 0; while (x < len) { int ch = in.read(); if (ch == '0') { in.read(); // 'x' byteStr[0] = (char) in.read(); byteStr[1] = (char) in.read(); int byteVal = Integ... |
public void produce(Vector v, FileInputStream is) throws IOException { reader = new BufferedReader(new InputStreamReader(is)); int width = -1, height = -1; | public void produce (Vector v, InputStream is) throws IOException { reader = new BufferedReader (new InputStreamReader (is)); int width = -1, height = -1; | public void produce(Vector v, FileInputStream is) throws IOException { reader = new BufferedReader(new InputStreamReader(is)); int width = -1, height = -1; for (int i = 0; i < 2; i++) { String line = reader.readLine(); StringTokenizer st = new StringTokenizer(line); st.nextToken(); // #define st.nextToken()... |
for (int i = 0; i < 2; i++) { String line = reader.readLine(); StringTokenizer st = new StringTokenizer(line); | for (int i = 0; i < 2; i++) { String line = reader.readLine (); StringTokenizer st = new StringTokenizer (line); st.nextToken (); st.nextToken (); if (i == 0) width = Integer.parseInt (st.nextToken (), 10); else height = Integer.parseInt (st.nextToken (), 10); } | public void produce(Vector v, FileInputStream is) throws IOException { reader = new BufferedReader(new InputStreamReader(is)); int width = -1, height = -1; for (int i = 0; i < 2; i++) { String line = reader.readLine(); StringTokenizer st = new StringTokenizer(line); st.nextToken(); // #define st.nextToken()... |
st.nextToken(); st.nextToken(); if (i == 0) width = Integer.parseInt(st.nextToken(), 10); else height = Integer.parseInt(st.nextToken(), 10); } | for (int i = 0; i < v.size (); i++) { ImageConsumer ic = (ImageConsumer) v.elementAt (i); | public void produce(Vector v, FileInputStream is) throws IOException { reader = new BufferedReader(new InputStreamReader(is)); int width = -1, height = -1; for (int i = 0; i < 2; i++) { String line = reader.readLine(); StringTokenizer st = new StringTokenizer(line); st.nextToken(); // #define st.nextToken()... |
for (int i = 0; i < v.size(); i++) { ImageConsumer ic = (ImageConsumer) v.elementAt(i); | ic.setDimensions (width, height); ic.setColorModel (cm); ic.setHints (ImageConsumer.COMPLETESCANLINES | ImageConsumer.SINGLEFRAME | ImageConsumer.SINGLEPASS | ImageConsumer.TOPDOWNLEFTRIGHT); } | public void produce(Vector v, FileInputStream is) throws IOException { reader = new BufferedReader(new InputStreamReader(is)); int width = -1, height = -1; for (int i = 0; i < 2; i++) { String line = reader.readLine(); StringTokenizer st = new StringTokenizer(line); st.nextToken(); // #define st.nextToken()... |
ic.setDimensions(width, height); ic.setColorModel(cm); ic.setHints(ImageConsumer.COMPLETESCANLINES | ImageConsumer.SINGLEFRAME | ImageConsumer.SINGLEPASS | ImageConsumer.TOPDOWNLEFTRIGHT); } | while (reader.read () != '{') { } | public void produce(Vector v, FileInputStream is) throws IOException { reader = new BufferedReader(new InputStreamReader(is)); int width = -1, height = -1; for (int i = 0; i < 2; i++) { String line = reader.readLine(); StringTokenizer st = new StringTokenizer(line); st.nextToken(); // #define st.nextToken()... |
while (reader.read() != '{') { } | for (int line = 0; line < height; line++) { int scanline[] = getScanline (reader, width); | public void produce(Vector v, FileInputStream is) throws IOException { reader = new BufferedReader(new InputStreamReader(is)); int width = -1, height = -1; for (int i = 0; i < 2; i++) { String line = reader.readLine(); StringTokenizer st = new StringTokenizer(line); st.nextToken(); // #define st.nextToken()... |
for (int line = 0; line < height; line++) { int scanline[] = getScanline(reader, width); | for (int i = 0; i < v.size (); i++) { ImageConsumer ic = (ImageConsumer) v.elementAt (i); ic.setPixels (0, 0 + line, width, 1, cm, scanline, 0, width); } } | public void produce(Vector v, FileInputStream is) throws IOException { reader = new BufferedReader(new InputStreamReader(is)); int width = -1, height = -1; for (int i = 0; i < 2; i++) { String line = reader.readLine(); StringTokenizer st = new StringTokenizer(line); st.nextToken(); // #define st.nextToken()... |
for (int i = 0; i < v.size(); i++) { ImageConsumer ic = (ImageConsumer) v.elementAt(i); ic.setPixels(0, 0 + line, width, 1, cm, scanline, 0, width); } } for (int i = 0; i < v.size(); i++) { ImageConsumer ic = (ImageConsumer) v.elementAt(i); ic.imageComplete(ImageConsumer.STATICIMAGEDONE); } } | for (int i = 0; i < v.size (); i++) { ImageConsumer ic = (ImageConsumer) v.elementAt (i); ic.imageComplete (ImageConsumer.STATICIMAGEDONE); } } | public void produce(Vector v, FileInputStream is) throws IOException { reader = new BufferedReader(new InputStreamReader(is)); int width = -1, height = -1; for (int i = 0; i < 2; i++) { String line = reader.readLine(); StringTokenizer st = new StringTokenizer(line); st.nextToken(); // #define st.nextToken()... |
abstract void produce(Vector v, FileInputStream is) throws IOException; | public abstract void produce (Vector v, InputStream is) throws IOException; | abstract void produce(Vector v, FileInputStream is) throws IOException; |
protected AccessibleAbstractButton(JComponent c) | protected AccessibleAbstractButton() | protected AccessibleAbstractButton(JComponent c) { super(c); } |
super(c); | protected AccessibleAbstractButton(JComponent c) { super(c); } | |
public final Class getCategory() | public Class getCategory() | public final Class getCategory() { return JobMessageFromOperator.class; } |
public final String getName() | public String getName() | public final String getName() { return "job-message-from-operator"; } |
if (console != null) console.clearLine((int) console.getCursor().getY()); | if (console != null) { console.clearLine(console.getCursorY()); } | private void redisplay() { // clear the line if (console != null) console.clearLine((int) console.getCursor().getY()); // display the prompt out.print(prompt()); // display the required history/current line if (historyIndex == -1) currentLine = newestLine; else currentLine = history.getCommand(historyI... |
public void autoscroll (Point location); | void autoscroll (Point location); | public void autoscroll (Point location); |
public Insets getAutoscrollInsets (); | Insets getAutoscrollInsets (); | public Insets getAutoscrollInsets (); |
if (init != null) | public RenderingHints(Map init) { putAll(init); } | |
Iterator iterator = m.keySet().iterator(); while (iterator.hasNext()) { Key key = (Key) iterator.next(); if (!key.isCompatibleValue(m.get(key))) throw new IllegalArgumentException(); } | public void putAll(Map m) { hintMap.putAll(m); } | |
return remove((Key) key); | return hintMap.remove((Key) key); | public Object remove(Object key) { return remove((Key) key); } |
public final Class getCategory() | public Class getCategory() | public final Class getCategory() { return DocumentName.class; } |
public final String getName() | public String getName() | public final String getName() { return "document-name"; } |
if (comp==rootPane) | if (comp==rootPane || ! isRootPaneCheckingEnabled()) | public void remove(Component comp) { // If we're removing the root pane, use super.remove. Otherwise // pass it on to the content pane instead. if (comp==rootPane) super.remove(comp); else getContentPane().remove(comp); } |
firePropertyChange("closable", ! closable, closable); } | public void setClosable(boolean b) { closable = b; } | |
firePropertyChange("iconable", ! iconable, iconable); } | public void setIconifiable(boolean b) { iconable = b; } | |
firePropertyChange("maximizable", ! maximizable, maximizable); } | public void setMaximizable(boolean b) { maximizable = b; } | |
firePropertyChange("resizable", ! resizable, resizable); } | public void setResizable(boolean b) { resizable = b; } | |
if (isShowing()) repaint(); | public void setSelected(boolean selected) throws PropertyVetoException { if (selected != isSelected()) { fireVetoableChange(IS_SELECTED_PROPERTY, selected, isSelected); if (! selected) defaultFocus = getMostRecentFocusOwner(); isSelected = selected; if (selected) restoreSubcomponentFocus(); firePropertyC... | |
super(); | public BasicToolBarUI() { super(); } | |
protected boolean canDock(Component c, Point p) | public boolean canDock(Component c, Point p) | protected boolean canDock(Component c, Point p) { if (areaOfClick(c, p) != -1) return true; return false; } |
if (areaOfClick(c, p) != -1) return true; return false; | return areaOfClick(c, p) != -1; | protected boolean canDock(Component c, Point p) { if (areaOfClick(c, p) != -1) return true; return false; } |
return 0; | return this.orientation; | public int getOrientation() { return 0; // TODO } // getOrientation() |
if (orientation != HORIZONTAL && orientation != VERTICAL) throw new IllegalArgumentException(orientation + " is not a legal orientation"); if (orientation != this.orientation) { int oldOrientation = this.orientation; this.orientation = orientation; firePropertyChange(ORIENTATION_CHANGED_PROPERTY, oldOrientation, this.o... | public void setOrientation(int orientation) { // TODO } // setOrientation() | |
if (anchorCert == null) | if (anchorCert != null) | public CertPathValidatorResult engineValidate(CertPath path, CertPathParameters params) throws CertPathValidatorException, InvalidAlgorithmParameterException { if (!(params instanceof PKIXParameters)) throw new InvalidAlgorithmParameterException("not a PKIXPa... |
-pos.x, -pos.y, | 0, 0, | public void paint(Graphics g, JComponent c) { JViewport v = (JViewport)c; Component view = v.getView(); if (view == null) return; Point pos = v.getViewPosition(); Rectangle viewBounds = view.getBounds(); Rectangle portBounds = v.getBounds(); if (viewBounds.width == 0 || viewBo... |
public Driver getDriver() { | final Driver getDriver() { | public Driver getDriver() { return driver; } |
super(TYPE_USHORT, size); | super(TYPE_USHORT, size, 1, 0); bankData = new short[1][]; | public DataBufferUShort(int size) { super(TYPE_USHORT, size); data = new short[size]; } |
bankData[0] = data; | public DataBufferUShort(int size) { super(TYPE_USHORT, size); data = new short[size]; } | |
dst = new int[numComponents]; | dst = new int[src.length]; | public int[] lookupPixel(int[] src, int[] dst) throws ArrayIndexOutOfBoundsException { if (dst == null) dst = new int[numComponents]; if (data.length == 1) for (int i=0; i < src.length; i++) dst[i] = data[0][src[i] - offset]; else for (int i=0; i < src.length; i++) dst[i] = data[i][src[i] ... |
throws NotImplementedException | public FixedHeightLayoutCache() { // TODO } | |
throws NotImplementedException | public TreePath getPathForRow(int row) { //TODO return null; } | |
throws NotImplementedException | public int getRowForPath(TreePath value0) { return 0; } | |
if (pad.equals(PKCS7_PAD)) | if (pad.equals(PKCS7_PAD) || pad.equals(PKCS5_PAD)) | public static final IPad getInstance(String pad) { if (pad == null) { return null; } pad = pad.trim().toLowerCase(); if (pad.endsWith("padding")) pad = pad.substring(0, pad.length() - "padding".length()); IPad result = null; if (pad.equals(PKCS7_PAD)) { result = new P... |
hs.add(PKCS5_PAD); | public static final Set getNames() { HashSet hs = new HashSet(); hs.add(PKCS7_PAD); hs.add(TBC_PAD); hs.add(EME_PKCS1_V1_5_PAD); hs.add(SSL3_PAD); hs.add(TLS1_PAD); return Collections.unmodifiableSet(hs); } | |
Object oldValue; | if (this.headerValue == headerValue) return; | public void setHeaderValue(Object headerValue) { // Variables Object oldValue; // Get Old Value oldValue = this.headerValue; // Set Propeprty this.headerValue = headerValue; // Notify Listeners of change firePropertyChange(HEADER_VALUE_PROPERTY, oldValue, headerValue); } |
oldValue = this.headerValue; | Object oldValue = this.headerValue; | public void setHeaderValue(Object headerValue) { // Variables Object oldValue; // Get Old Value oldValue = this.headerValue; // Set Propeprty this.headerValue = headerValue; // Notify Listeners of change firePropertyChange(HEADER_VALUE_PROPERTY, oldValue, headerValue); } |
sm.checkListen(impl.getLocalPort()); | sm.checkAccept(impl.getInetAddress().getHostAddress(), impl.getLocalPort()); | public Socket accept() throws IOException { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkListen(impl.getLocalPort()); Socket socket = new Socket(); try { implAccept(socket); } catch (IOException e) { try { socket.close(); } catch (IOException e2... |
setLayout(null); | void init() { dragEnabled = false; fixedCellHeight = -1; fixedCellWidth = -1; layoutOrientation = VERTICAL; opaque = true; valueIsAdjusting = false; visibleRowCount = 8; cellRenderer = new DefaultListCellRenderer(); listListener = new ListListener(); setModel(new DefaultListModel()); ... | |
protected MetalDividerLayout() | public MetalDividerLayout() | protected MetalDividerLayout() { // Nothing to do here } |
Insets insets = getInsets(); Rectangle bounds = getBounds(); int x = insets.left + (bounds.width - insets.left - insets.right - defaultSize) / 2; int y = insets.top + (bounds.height - insets.left - insets.right - defaultSize) / 2; paintTriangle(g, x, y, defaultSize, direction, isEnabled()); | public void paint(Graphics g) { super.paint(g); } | |
throw new MARSHAL(ex.toString()); | MARSHAL t = new MARSHAL(); t.initCause(ex); throw t; | public void send(IOR ior) { try { Socket socket = new Socket(ior.Internet.host, ior.Internet.port); OutputStream socketOutput = socket.getOutputStream(); write(socketOutput); socketOutput.close(); socket.close(); } catch (IOException ex) { throw new MARS... |
if (resolvers == null) { resolvers = new Hashtable(); | if (resolvers == null) { resolvers = new Hashtable(); } if (resolver == null) { try { if (resolver == null) { String[] server = new String[] { _dnsserver.toString() }; resolver = new ExtendedResolver(server); Lookup.setDefaultResolver(resolver); resolvers.put(_dnsserver.toString(), resolver); } } catch (UnknownHostE... | public static void addDnsServer(ProtocolAddress _dnsserver) throws NetworkException { if (resolvers == null) { resolvers = new Hashtable(); } if (resolver == null) { try { if (resolver == null) { String[] server = new String[]{_dnsserver.toString()}; reso... |
if (resolver == null) { try { if (resolver == null) { String[] server = new String[]{_dnsserver.toString()}; resolver = new ExtendedResolver(server); Lookup.setDefaultResolver(resolver); resolvers.put(_dnsserver.toString(), resolver); } } catch (UnknownHostException e) { throw new NetworkException("Can't add DnsServe... | public static void addDnsServer(ProtocolAddress _dnsserver) throws NetworkException { if (resolvers == null) { resolvers = new Hashtable(); } if (resolver == null) { try { if (resolver == null) { String[] server = new String[]{_dnsserver.toString()}; reso... | |
public ProtocolAddress[] getByName(String hostname) throws UnknownHostException { ProtocolAddress[] protocolAddresses = null; | public ProtocolAddress[] getByName(final String hostname) throws UnknownHostException { final PrivilegedExceptionAction action = new PrivilegedExceptionAction() { public Object run() throws UnknownHostException { ProtocolAddress[] protocolAddresses; | public ProtocolAddress[] getByName(String hostname) throws UnknownHostException { ProtocolAddress[] protocolAddresses = null; protocolAddresses = getFromHostsFile(hostname); if (protocolAddresses != null) { return protocolAddresses; } Lookup lookup = null; Lookup.setDefaultResolver(resolver... |
protocolAddresses = getFromHostsFile(hostname); | protocolAddresses = getFromHostsFile(hostname); if (protocolAddresses != null) { return protocolAddresses; } | public ProtocolAddress[] getByName(String hostname) throws UnknownHostException { ProtocolAddress[] protocolAddresses = null; protocolAddresses = getFromHostsFile(hostname); if (protocolAddresses != null) { return protocolAddresses; } Lookup lookup = null; Lookup.setDefaultResolver(resolver... |
if (protocolAddresses != null) { return protocolAddresses; | Lookup.setDefaultResolver(resolver); final Lookup lookup; try { lookup = new Lookup(hostname); } catch (TextParseException e) { throw new UnknownHostException(hostname); } lookup.run(); if (lookup.getResult() == Lookup.SUCCESSFUL) { final Record[] records = lookup.getAnswers(); final int recordCount = records.length... | public ProtocolAddress[] getByName(String hostname) throws UnknownHostException { ProtocolAddress[] protocolAddresses = null; protocolAddresses = getFromHostsFile(hostname); if (protocolAddresses != null) { return protocolAddresses; } Lookup lookup = null; Lookup.setDefaultResolver(resolver... |
Lookup lookup = null; Lookup.setDefaultResolver(resolver); try { lookup = new Lookup(hostname); } catch (TextParseException e) { throw new UnknownHostException(hostname); } lookup.run(); if (lookup.getResult() == Lookup.SUCCESSFUL) { Record[] records = lookup.getAnswers(); protocolAddresses = new ProtocolAddress[re... | public ProtocolAddress[] getByName(String hostname) throws UnknownHostException { ProtocolAddress[] protocolAddresses = null; protocolAddresses = getFromHostsFile(hostname); if (protocolAddresses != null) { return protocolAddresses; } Lookup lookup = null; Lookup.setDefaultResolver(resolver... | |
public static Resolver getInstance() { if (res == null) { res = new ResolverImpl(); | public static Resolver getInstance() { if (res == null) { res = new ResolverImpl(); } return res; | public static Resolver getInstance() { if (res == null) { res = new ResolverImpl(); } return res; } |
return res; } | public static Resolver getInstance() { if (res == null) { res = new ResolverImpl(); } return res; } | |
public static void printDnsServers() { if (resolvers == null) { return; | public static void printDnsServers() { if (resolvers == null) { return; } Iterator iterator = resolvers.keySet().iterator(); String dnsServer; while (iterator.hasNext()) { dnsServer = (String) iterator.next(); System.out.println(dnsServer); } | public static void printDnsServers() { if (resolvers == null) { return; } Iterator iterator = resolvers.keySet().iterator(); String dnsServer; while (iterator.hasNext()) { dnsServer = (String) iterator.next(); System.out.println(dnsServer); } } |
Iterator iterator = resolvers.keySet().iterator(); String dnsServer; while (iterator.hasNext()) { dnsServer = (String) iterator.next(); System.out.println(dnsServer); } } | public static void printDnsServers() { if (resolvers == null) { return; } Iterator iterator = resolvers.keySet().iterator(); String dnsServer; while (iterator.hasNext()) { dnsServer = (String) iterator.next(); System.out.println(dnsServer); } } | |
if (resolver == null) { return; | if (resolver == null) { return; } String key = _dnsserver.toString(); if (resolvers.containsKey(key)) { org.xbill.DNS.Resolver resolv = (org.xbill.DNS.Resolver) resolvers .remove(key); if (resolver.getResolvers().length == 1) { resolver = null; } else { resolver.deleteResolver(resolv); } } | public static void removeDnsServer(ProtocolAddress _dnsserver) { if (resolver == null) { return; } String key = _dnsserver.toString(); if (resolvers.containsKey(key)) { org.xbill.DNS.Resolver resolv = (org.xbill.DNS.Resolver) resolvers.remove(key); if (resolver.getResolvers().length ... |
String key = _dnsserver.toString(); if (resolvers.containsKey(key)) { org.xbill.DNS.Resolver resolv = (org.xbill.DNS.Resolver) resolvers.remove(key); if (resolver.getResolvers().length == 1) resolver = null; else resolver.deleteResolver(resolv); } } | public static void removeDnsServer(ProtocolAddress _dnsserver) { if (resolver == null) { return; } String key = _dnsserver.toString(); if (resolvers.containsKey(key)) { org.xbill.DNS.Resolver resolv = (org.xbill.DNS.Resolver) resolvers.remove(key); if (resolver.getResolvers().length ... | |
vr = new Rectangle(); ir = new Rectangle(); tr = new Rectangle(); | public BasicLabelUI() { super(); } | |
void inactiveGroup (ActivationGroupID id, long incarnation) | void inactiveGroup (ActivationGroupID groupId, long incarnation) | void inactiveGroup (ActivationGroupID id, long incarnation) throws UnknownGroupException, RemoteException; |
return key.equals(e.getKey()) | return WeakHashMap.equals(getKey(), e.getKey()) | public boolean equals(Object o) { if (o instanceof Map.Entry) { Map.Entry e = (Map.Entry) o; return key.equals(e.getKey()) && WeakHashMap.equals(value, e.getValue()); } return false; } |
return key + "=" + value; | return getKey() + "=" + value; | public String toString() { return key + "=" + value; } |
throw new ConcurrentModificationException(); | throw new ConcurrentModificationException(knownMod + " != " + modCount); | public Iterator iterator() { return new Iterator() { /** * The entry that was returned by the last * <code>next()</code> call. This is also the entry whose * bucket should be removed by the <code>remove</code> call. <br> * * It is null, if the <code>next<... |
* @throws ConcurrentModificationException if the hash map was * modified. | public Iterator iterator() { return new Iterator() { /** * The entry that was returned by the last * <code>next()</code> call. This is also the entry whose * bucket should be removed by the <code>remove</code> call. <br> * * It is null, if the <code>next<... | |
checkMod(); | public Iterator iterator() { return new Iterator() { /** * The entry that was returned by the last * <code>next()</code> call. This is also the entry whose * bucket should be removed by the <code>remove</code> call. <br> * * It is null, if the <code>next<... | |
throw new ConcurrentModificationException(); | throw new ConcurrentModificationException(knownMod + " != " + modCount); | private void checkMod() { // This method will get inlined. cleanQueue(); if (knownMod != modCount) throw new ConcurrentModificationException(); } |
checkMod(); | public boolean hasNext() { checkMod(); return nextEntry != null; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.