rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
|
---|---|---|
public MemoryResource claimMemoryResource(ResourceOwner owner, Address start, int size, int mode) throws ResourceNotFreeException; | public MemoryResource claimMemoryResource(ResourceOwner owner, Address start, Extent size, int mode) throws ResourceNotFreeException; | public MemoryResource claimMemoryResource(ResourceOwner owner, Address start, int size, int mode) throws ResourceNotFreeException; |
protected DoubleWordItem(int kind, int offsetToFP, Register lsb, Register msb) { super(kind, offsetToFP); this.lsb = lsb; this.msb = msb; } | protected DoubleWordItem(ItemFactory factory) { super(factory); } | protected DoubleWordItem(int kind, int offsetToFP, Register lsb, Register msb) { super(kind, offsetToFP); this.lsb = lsb; this.msb = msb; } |
case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; | case Kind.LOCAL: res = (DoubleWordItem)factory.createLocal(getType(), super.getOffsetToFP()); break; | protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; } |
case Kind.FPUSTACK: notImplemented(); res = null; break; | case Kind.FPUSTACK: notImplemented(); res = null; break; case Kind.STACK: notImplemented(); res = null; break; | protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; } |
case Kind.STACK: notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; } | default: throw new IllegalArgumentException("Invalid item kind"); } return res; } | protected final Item clone(EmitterContext ec) { final DoubleWordItem res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: res = L1AHelper.requestDoubleWordRegisters(ec, getType()); final Register lsb = res.getLsbRegister(); final Register msb = res.getMsbRegister(); os.writeMOV(INTSIZE, lsb, this.lsb); os.writeMOV(INTSIZE, msb, this.msb); break; case Kind.LOCAL: res = createLocal(getType(), super.getOffsetToFP()); break; case Kind.CONSTANT: res = cloneConstant(); break; case Kind.FPUSTACK: //TODO notImplemented(); res = null; break; case Kind.STACK: //TODO notImplemented(); res = null; break; default: throw new IllegalArgumentException("Invalid item kind"); } return res; } |
release(ec); kind = Kind.STACK; | cleanup(ec); kind = Kind.STACK; | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, -8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } } |
final X86RegisterPool pool = ec.getPool(); switch (getKind()) { case Kind.REGISTER: pool.release(lsb); pool.release(msb); break; case Kind.LOCAL: break; case Kind.CONSTANT: break; case Kind.FPUSTACK: break; case Kind.STACK: break; } this.lsb = null; this.msb = null; this.kind = 0; } | cleanup(ec); factory.release(this); } | final void release(EmitterContext ec) { //assertCondition(!ec.getVStack().contains(this), "Cannot release while on vstack"); final X86RegisterPool pool = ec.getPool(); switch (getKind()) { case Kind.REGISTER: pool.release(lsb); pool.release(msb); break; case Kind.LOCAL: // nothing to do break; case Kind.CONSTANT: // nothing to do break; case Kind.FPUSTACK: // nothing to do break; case Kind.STACK: // nothing to do break; } this.lsb = null; this.msb = null; this.kind = 0; } |
static final void fxch(AbstractX86Stream os, FPUStack fpuStack, Register fpuReg) { if (fpuReg == Register.ST0) { throw new StackException("Cannot fxch ST0"); | static final void fxch(AbstractX86Stream os, FPUStack fpuStack, Item item) { if (!fpuStack.isTos(item)) { final Register fpuReg = fpuStack.getRegister(item); fxch(os, fpuStack, fpuReg); | static final void fxch(AbstractX86Stream os, FPUStack fpuStack, Register fpuReg) { if (fpuReg == Register.ST0) { throw new StackException("Cannot fxch ST0"); } os.writeFXCH(fpuReg); fpuStack.fxch(fpuReg); } |
os.writeFXCH(fpuReg); fpuStack.fxch(fpuReg); | static final void fxch(AbstractX86Stream os, FPUStack fpuStack, Register fpuReg) { if (fpuReg == Register.ST0) { throw new StackException("Cannot fxch ST0"); } os.writeFXCH(fpuReg); fpuStack.fxch(fpuReg); } |
|
public X500Principal (String name) | private X500Principal() | public X500Principal (String name) { this(); if (name == null) throw new NullPointerException(); try { parseString (name); } catch (IOException ioe) { IllegalArgumentException iae = new IllegalArgumentException("malformed name"); iae.initCause (ioe); throw iae; } } |
this(); if (name == null) throw new NullPointerException(); try { parseString (name); } catch (IOException ioe) { IllegalArgumentException iae = new IllegalArgumentException("malformed name"); iae.initCause (ioe); throw iae; } } | components = new LinkedList(); currentRdn = new LinkedHashMap(); components.add (currentRdn); } | public X500Principal (String name) { this(); if (name == null) throw new NullPointerException(); try { parseString (name); } catch (IOException ioe) { IllegalArgumentException iae = new IllegalArgumentException("malformed name"); iae.initCause (ioe); throw iae; } } |
public OID(String strRep) | public OID(int[] components) | public OID(String strRep) { this(strRep, false); } |
this(strRep, false); | this(components, false); | public OID(String strRep) { this(strRep, false); } |
encoded = new byte[0]; | IllegalArgumentException iae = new IllegalArgumentException (); iae.initCause (ioe); throw iae; | public byte[] getEncoded() { if (encoded == null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); length = DERWriter.write(out, this); encoded = out.toByteArray(); } catch (IOException ioe) { encoded = new byte[0]; } } return (byte[]) encoded.clone(); } |
encoded = new byte[0]; | IllegalArgumentException iae = new IllegalArgumentException (); iae.initCause (ioe); throw iae; | public int getLength() { if (encoded == null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); length = DERWriter.write(out, this); encoded = out.toByteArray(); } catch (IOException ioe) { encoded = new byte[0]; } } return length; } |
encoded = new byte[0]; | IllegalArgumentException iae = new IllegalArgumentException (); iae.initCause (ioe); throw iae; | public int getEncodedLength() { if (encoded == null) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); length = DERWriter.write(out, this); encoded = out.toByteArray(); } catch (IOException ioe) { encoded = new byte[0]; } } return encoded.length; } |
Toolkit tk = getToolkit(); if (! (tk instanceof EmbeddedWindowSupport)) throw new UnsupportedOperationException ("Embedded windows are not supported by the current peers: " + tk.getClass()); | ClasspathToolkit tk = (ClasspathToolkit) getToolkit(); | public void addNotify() { Toolkit tk = getToolkit(); if (! (tk instanceof EmbeddedWindowSupport)) throw new UnsupportedOperationException ("Embedded windows are not supported by the current peers: " + tk.getClass()); // Circumvent the package-privateness of the AWT internal // java.awt.Component.peer member variable. try { Field peerField = Component.class.getDeclaredField("peer"); AccessController.doPrivileged(new SetAccessibleAction(peerField)); peerField.set(this, ((EmbeddedWindowSupport) tk).createEmbeddedWindow (this)); } catch (IllegalAccessException e) { // This should never happen. } catch (NoSuchFieldException e) { // This should never happen. } super.addNotify(); } |
peerField.set(this, ((EmbeddedWindowSupport) tk).createEmbeddedWindow (this)); | peerField.set(this, tk.createEmbeddedWindow (this)); | public void addNotify() { Toolkit tk = getToolkit(); if (! (tk instanceof EmbeddedWindowSupport)) throw new UnsupportedOperationException ("Embedded windows are not supported by the current peers: " + tk.getClass()); // Circumvent the package-privateness of the AWT internal // java.awt.Component.peer member variable. try { Field peerField = Component.class.getDeclaredField("peer"); AccessController.doPrivileged(new SetAccessibleAction(peerField)); peerField.set(this, ((EmbeddedWindowSupport) tk).createEmbeddedWindow (this)); } catch (IllegalAccessException e) { // This should never happen. } catch (NoSuchFieldException e) { // This should never happen. } super.addNotify(); } |
addNotify() { | public void addNotify() { | addNotify(){ if (menuBar != null) menuBar.addNotify(); if (peer == null) peer = getToolkit ().createFrame (this); super.addNotify();} |
public SetAccessibleAction(AccessibleObject member) | public SetAccessibleAction() | public SetAccessibleAction(AccessibleObject member) { this.member = member; } |
this.member = member; | public SetAccessibleAction(AccessibleObject member) { this.member = member; } |
|
File ses = new File(SESSIONS); | private void checkLegacy() { // we check if the sessions file already exists in the directory // if it does exist we are working with an old install so we // need to set the settings directory to the users directory // SESSIONS is declared as a string, so we just can use the keyword here. File ses = new File(SESSIONS); if(ses.exists()) { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.dir") + File.separator); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); System.out.println("User Home = " + System.getProperty("user.home")); } } |
|
settings.setProperty("emulator.settingsDirectory", System.getProperty("user.dir") + File.separator); | int cfc; settings.setProperty("emulator.settingsDirectory", System.getProperty("user.dir") + File.separator); cfc = JOptionPane.showConfirmDialog(null, "Dear User,\n\n" + "Seems you are using an old version of tn5250j.\n" + "In meanwhile the application became multi-user capable,\n" + "which means ALL the config- and settings-files are\n" + "placed in your home-dir to avoid further problems in\n" + "the near future.\n\n" + "You have the choice to choose if you want the files\n" + "to be copied or not, please make your choice !\n\n" + "Shall we copy the files to the new location ?", "Old install detected", JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_OPTION); if (cfc == 0) { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); checkDirs(); copyConfigs(SESSIONS); copyConfigs(MACROS); copyConfigs(KEYMAP); } else { JOptionPane.showMessageDialog(null, "Dear User,\n\n" + "You choosed not to copy the file.\n" + "This means the program will end here.\n\n" + "To use this NON-STANDARD behaviour start tn5250j\n" + "with the -Duser.home=<your home dir> parameter\n" + "to avoid this question popping up all the time.", "Using NON-STANDARD behaviour", JOptionPane.WARNING_MESSAGE); System.exit(0); } | private void checkLegacy() { // we check if the sessions file already exists in the directory // if it does exist we are working with an old install so we // need to set the settings directory to the users directory // SESSIONS is declared as a string, so we just can use the keyword here. File ses = new File(SESSIONS); if(ses.exists()) { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.dir") + File.separator); } else { settings.setProperty("emulator.settingsDirectory", System.getProperty("user.home") + File.separator + ".tn5250j" + File.separator); System.out.println("User Home = " + System.getProperty("user.home")); } } |
File sd = new File(settings.getProperty("emulator.settingsDirectory")); if (!sd.isDirectory()) sd.mkdirs(); | private void loadSettings() { FileInputStream in = null; settings = new Properties(); // here we will check for a system property is provided first. if (System.getProperties().containsKey("emulator.settingsDirectory")) { settings.setProperty("emulator.settingsDirectory", System.getProperty("emulator.settingsDirectory") + File.separator); } else { try { in = new FileInputStream(settingsFile); settings.load(in); } catch (FileNotFoundException fnfe) { System.out.println(" Information Message: " + fnfe.getMessage() + ". The file " + settingsFile + " will" + " be created for first time use."); checkLegacy(); saveSettings(); } catch (IOException ioe) { System.out.println("IO Exception accessing File " + settingsFile + " for the following reason : " + ioe.getMessage()); } catch (SecurityException se) { System.out.println("Security Exception for file " + settingsFile + " This file can not be " + "accessed because : " + se.getMessage()); } } // we now check to see if the settings directory is a directory. If not then we create it File sd = new File(settings.getProperty("emulator.settingsDirectory")); if (!sd.isDirectory()) sd.mkdirs(); } |
|
abstract public String getProperty(String regKey, String defaultValue); | abstract public String getProperty(String regKey); | abstract public String getProperty(String regKey, String defaultValue); |
while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); | if (repeats) while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); | public void run() { running = true; try { sleep(initialDelay); queueEvent(); while (running) { try { sleep(delay); } catch (InterruptedException e) { return; } queueEvent(); if (logTimers) System.out.println("javax.swing.Timer -> clocktick"); if ( ! repeats) break; } running = false; } catch (Exception e) { // The timer is no longer running. running = false; } } |
setOpaque(true); | public SwingLabel(Label awtComponent) { this.awtComponent = awtComponent; } |
|
super(toolkit, label, new SwingLabel(label)); final JLabel jLabel = (JLabel) jComponent; SwingToolkit.add(label, jLabel); SwingToolkit.copyAwtProperties(label, jLabel); setText(label.getText()); } | super(toolkit, label, new SwingLabel(label)); SwingToolkit.add(label, jComponent); SwingToolkit.copyAwtProperties(label, jComponent); setText(label.getText()); setAlignment(label.getAlignment()); } | public SwingLabelPeer(SwingToolkit toolkit, Label label) { super(toolkit, label, new SwingLabel(label)); final JLabel jLabel = (JLabel) jComponent; SwingToolkit.add(label, jLabel); SwingToolkit.copyAwtProperties(label, jLabel); setText(label.getText()); } |
} | switch (alignment) { case Label.LEFT: jComponent.setHorizontalAlignment(SwingConstants.LEFT); break; case Label.CENTER: jComponent.setHorizontalAlignment(SwingConstants.CENTER); break; case Label.RIGHT: jComponent.setHorizontalAlignment(SwingConstants.RIGHT); break; } } | public void setAlignment(int alignment) { //TODO implement it } |
((JLabel) jComponent).setText(text); } | jComponent.setText(text); } | public void setText(String text) { ((JLabel) jComponent).setText(text); } |
try { ShellUtils.getShellManager().registerShell(this); } catch (NameNotFoundException ex) { } dirty = false; String result = null; try { CommandLine cl = new CommandLine(partial); String cmd = ""; if (cl.hasNext()) { cmd = cl.next(); if (!cmd.trim().equals("") && cl.hasNext()) try { Class cmdClass = getCommandClass(cmd); Help.Info info = Help.getInfo(cmdClass); result = cmd + " " + info.complete(cl); } catch (ClassNotFoundException ex) { throw new CompletionException("Command class not found"); } } if (result == null) result = defaultArg.complete(cmd); if (!partial.equals(result) && !dirty) { dirty = true; for (int i = 0; i < partial.length() + currentPrompt.length(); i++) System.out.print("\b"); } } catch (CompletionException ex) { System.out.println(); System.err.println(ex.getMessage()); result = partial; dirty = true; } if (dirty) { dirty = false; System.out.print(currentPrompt + result); } return result; } | try { ShellUtils.getShellManager().registerShell(this); } catch (NameNotFoundException ex) { } dirty = false; String result = null; try { CommandLine cl = new CommandLine(partial); String cmd = ""; if (cl.hasNext()) { cmd = cl.next(); if (!cmd.trim().equals("") && cl.hasNext()) try { Class cmdClass = getCommandClass(cmd); Help.Info info = Help.getInfo(cmdClass); result = cmd + " " + info.complete(cl); } catch (ClassNotFoundException ex) { throw new CompletionException( "Command class not found"); } catch (HelpException ex) { ex.printStackTrace(); throw new CompletionException( "Command class not found"); } } if (result == null) result = defaultArg.complete(cmd); if (!partial.equals(result) && !dirty) { dirty = true; for (int i = 0; i < partial.length() + currentPrompt.length(); i++) System.out.print("\b"); } } catch (CompletionException ex) { System.out.println(); System.err.println(ex.getMessage()); result = partial; dirty = true; } if (dirty) { dirty = false; System.out.print(currentPrompt + result); } return result; } | private String complete(String partial) { // workaround to set the currentShell to this shell try { ShellUtils.getShellManager().registerShell(this); } catch (NameNotFoundException ex) { } dirty = false; String result = null; try { CommandLine cl = new CommandLine(partial); String cmd = ""; if (cl.hasNext()) { cmd = cl.next(); if (!cmd.trim().equals("") && cl.hasNext()) try { // get command's help info Class cmdClass = getCommandClass(cmd); Help.Info info = Help.getInfo(cmdClass); // perform completion result = cmd + " " + info.complete(cl); // prepend command name and space // again } catch (ClassNotFoundException ex) { throw new CompletionException("Command class not found"); } } if (result == null) // assume this is the alias to be called result = defaultArg.complete(cmd); if (!partial.equals(result) && !dirty) { // performed direct completion without listing dirty = true; // indicate we want to have a new prompt for (int i = 0; i < partial.length() + currentPrompt.length(); i++) System.out.print("\b"); // clear line (cheap approach) } } catch (CompletionException ex) { System.out.println(); // next line System.err.println(ex.getMessage()); // print the error (optional) // this debug output is to trace where the Exception came from //ex.printStackTrace(System.err); result = partial; // restore old value dirty = true; // we need a new prompt } if (dirty) { dirty = false; System.out.print(currentPrompt + result); // print the prompt and go on with normal // operation } return result; } |
public AliasArgument(String name, String description) { super(name, description); | public AliasArgument(String name, String description, boolean multi) { super(name, description, multi); | public AliasArgument(String name, String description) { super(name, description); } |
public ShellException(String message, Throwable cause) { super(message, cause); | public ShellException() { super(); | public ShellException(String message, Throwable cause) { super(message, cause); } |
public abstract StringBuffer format (Date date, StringBuffer buf, FieldPosition pos); | public final StringBuffer format (Object obj, StringBuffer buf, FieldPosition pos) { if (obj instanceof Number) obj = new Date(((Number) obj).longValue()); else if (! (obj instanceof Date)) throw new IllegalArgumentException ("Cannot format given Object as a Date"); return format ((Date) obj, buf, pos); } | public abstract StringBuffer format (Date date, StringBuffer buf, FieldPosition pos); |
public int add(SocketBuffer skbuf, int index, int length) { | public int add(byte[] src, int srcOffset, int length) { | public int add(SocketBuffer skbuf, int index, int length) { if (length > getFreeSize()) { throw new IllegalArgumentException("Not enough free space"); } final int dstOffset = this.used; skbuf.get(this.data, dstOffset, index, length); this.used += length; return dstOffset; } |
skbuf.get(this.data, dstOffset, index, length); | System.arraycopy(src, srcOffset, this.data, dstOffset, length); | public int add(SocketBuffer skbuf, int index, int length) { if (length > getFreeSize()) { throw new IllegalArgumentException("Not enough free space"); } final int dstOffset = this.used; skbuf.get(this.data, dstOffset, index, length); this.used += length; return dstOffset; } |
public short loadShort(Offset offset) { | public short loadShort() { | public short loadShort(Offset offset) { return (short) 0; } |
public char loadChar(Offset offset) { | public char loadChar() { | public char loadChar(Offset offset) { return (char) 0; } |
public DDC1NoSignalException(String s) { super(s); | public DDC1NoSignalException() { super(); | public DDC1NoSignalException(String s) { super(s); } |
SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkConnect(address.getHostName(), port); | SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkConnect(address.getHostAddress(), port); | public void connect(InetAddress address, int port) { if (address == null) throw new IllegalArgumentException("Connect address may not be null"); if ((port < 1) || (port > 65535)) throw new IllegalArgumentException("Port number is illegal: " + port); SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkConnect(address.getHostName(), port); try { getImpl().connect(address, port); remoteAddress = address; remotePort = port; } catch (SocketException e) { // This means simply not connected or connect not implemented. } } |
s.checkConnect(localAddr.getHostName(), -1); | s.checkConnect(localAddr.getHostAddress(), -1); | public InetAddress getLocalAddress() { if (! isBound()) return null; InetAddress localAddr; try { localAddr = (InetAddress) getImpl().getOption(SocketOptions.SO_BINDADDR); SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(localAddr.getHostName(), -1); } catch (SecurityException e) { localAddr = InetAddress.ANY_IF; } catch (SocketException e) { // This cannot happen as we are bound. return null; } return localAddr; } |
getImpl().receive(p); | DatagramPacket p2 = new DatagramPacket(p.getData(), p.getOffset(), p.maxlen); getImpl().receive(p2); p.length = p2.length; if (p2.getAddress() != null) p.setAddress(p2.getAddress()); if (p2.getPort() != -1) p.setPort(p2.getPort()); | public synchronized void receive(DatagramPacket p) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); if (remoteAddress != null && remoteAddress.isMulticastAddress()) throw new IOException ("Socket connected to a multicast address my not receive"); if (getChannel() != null && ! getChannel().isBlocking() && ! ((DatagramChannelImpl) getChannel()).isInChannelOperation()) throw new IllegalBlockingModeException(); getImpl().receive(p); SecurityManager s = System.getSecurityManager(); if (s != null && isConnected()) s.checkAccept(p.getAddress().getHostName(), p.getPort()); } |
SecurityManager s = System.getSecurityManager(); if (s != null && isConnected()) s.checkAccept(p.getAddress().getHostName(), p.getPort()); } | SecurityManager s = System.getSecurityManager(); if (s != null && isConnected()) s.checkAccept(p.getAddress().getHostAddress(), p.getPort()); } | public synchronized void receive(DatagramPacket p) throws IOException { if (isClosed()) throw new SocketException("socket is closed"); if (remoteAddress != null && remoteAddress.isMulticastAddress()) throw new IOException ("Socket connected to a multicast address my not receive"); if (getChannel() != null && ! getChannel().isBlocking() && ! ((DatagramChannelImpl) getChannel()).isInChannelOperation()) throw new IllegalBlockingModeException(); getImpl().receive(p); SecurityManager s = System.getSecurityManager(); if (s != null && isConnected()) s.checkAccept(p.getAddress().getHostName(), p.getPort()); } |
public synchronized void setAddress(InetAddress iaddr) { if (iaddr == null) | public synchronized void setAddress(InetAddress address) { if (address == null) | public synchronized void setAddress(InetAddress iaddr) { if (iaddr == null) throw new NullPointerException("Null address"); address = iaddr; } |
address = iaddr; | this.address = address; | public synchronized void setAddress(InetAddress iaddr) { if (iaddr == null) throw new NullPointerException("Null address"); address = iaddr; } |
public synchronized void setPort(int iport) { if (iport < 0 || iport > 65535) throw new IllegalArgumentException("Invalid port: " + iport); | public synchronized void setPort(int port) { if (port < 0 || port > 65535) throw new IllegalArgumentException("Invalid port: " + port); | public synchronized void setPort(int iport) { if (iport < 0 || iport > 65535) throw new IllegalArgumentException("Invalid port: " + iport); port = iport; } |
port = iport; | this.port = port; | public synchronized void setPort(int iport) { if (iport < 0 || iport > 65535) throw new IllegalArgumentException("Invalid port: " + iport); port = iport; } |
p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin ).subtract( p ) ); | p = p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin ).subtract( p ) ); | public static BigInteger generateRandomPrime( int pmin, int pmax, BigInteger f ) { BigInteger d; //Step 1 - generate prime BigInteger p = new BigInteger( (pmax + pmin)/2, new Random() ); if( p.compareTo( BigInteger.valueOf( 1 ).shiftLeft( pmin ) ) <= 0 ) { p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin ).subtract( p ) ); } //Step 2 - test for even if( p.mod( BigInteger.valueOf(2) ).compareTo( BigInteger.valueOf( 0 )) == 0) p.add( BigInteger.valueOf( 1 ) ); for(;;) { //Step 3 if( p.compareTo( BigInteger.valueOf( 1 ).shiftLeft( pmax)) > 0) { //Step 3.1 p = p.subtract( BigInteger.valueOf( 1 ).shiftLeft( pmax) ); p = p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin) ); p = p.subtract( BigInteger.valueOf( 1 ) ); //Step 3.2 // put step 2 code here so looping code is cleaner //Step 2 - test for even if( p.mod( BigInteger.valueOf(2) ).compareTo( BigInteger.valueOf( 0 )) == 0) p.add( BigInteger.valueOf( 1 ) ); continue; } //Step 4 - compute GCD d = p.subtract( BigInteger.valueOf(1) ); d = d.gcd( f ); //Step 5 - test d if( d.compareTo( BigInteger.valueOf( 1 ) ) == 0) { //Step 5.1 - test primality if( p.isProbablePrime( 1 ) == true ) { //Step 5.2; return p; } } //Step 6 p = p.add( BigInteger.valueOf( 2 ) ); //Step 7 } } |
p.add( BigInteger.valueOf( 1 ) ); | p = p.add( BigInteger.valueOf( 1 ) ); | public static BigInteger generateRandomPrime( int pmin, int pmax, BigInteger f ) { BigInteger d; //Step 1 - generate prime BigInteger p = new BigInteger( (pmax + pmin)/2, new Random() ); if( p.compareTo( BigInteger.valueOf( 1 ).shiftLeft( pmin ) ) <= 0 ) { p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin ).subtract( p ) ); } //Step 2 - test for even if( p.mod( BigInteger.valueOf(2) ).compareTo( BigInteger.valueOf( 0 )) == 0) p.add( BigInteger.valueOf( 1 ) ); for(;;) { //Step 3 if( p.compareTo( BigInteger.valueOf( 1 ).shiftLeft( pmax)) > 0) { //Step 3.1 p = p.subtract( BigInteger.valueOf( 1 ).shiftLeft( pmax) ); p = p.add( BigInteger.valueOf( 1 ).shiftLeft( pmin) ); p = p.subtract( BigInteger.valueOf( 1 ) ); //Step 3.2 // put step 2 code here so looping code is cleaner //Step 2 - test for even if( p.mod( BigInteger.valueOf(2) ).compareTo( BigInteger.valueOf( 0 )) == 0) p.add( BigInteger.valueOf( 1 ) ); continue; } //Step 4 - compute GCD d = p.subtract( BigInteger.valueOf(1) ); d = d.gcd( f ); //Step 5 - test d if( d.compareTo( BigInteger.valueOf( 1 ) ) == 0) { //Step 5.1 - test primality if( p.isProbablePrime( 1 ) == true ) { //Step 5.2; return p; } } //Step 6 p = p.add( BigInteger.valueOf( 2 ) ); //Step 7 } } |
parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), convertModifiers (((KeyStroke)keys[i]).getModifiers())), (String)focusInputMap.get((KeyStroke)keys[i])); | KeyStroke stroke = (KeyStroke)keys[i]; String actionString = (String) focusInputMap.get(stroke); parentInputMap.put(KeyStroke.getKeyStroke(stroke.getKeyCode(), stroke.getModifiers()), actionString); | protected void installKeyboardActions() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); InputMap focusInputMap = (InputMap)defaults.get("List.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); // FIXME: The JDK uses a LazyActionMap for parentActionMap ActionMap parentActionMap = new ActionMap(); action = new ListAction(); Object keys[] = focusInputMap.allKeys(); // Register key bindings in the UI InputMap-ActionMap pair // Note that we register key bindings with both the old and new modifier // masks: InputEvent.SHIFT_MASK and InputEvent.SHIFT_DOWN_MASK and so on. for (int i = 0; i < keys.length; i++) { parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), convertModifiers (((KeyStroke)keys[i]).getModifiers())), (String)focusInputMap.get((KeyStroke)keys[i])); parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), ((KeyStroke)keys[i]).getModifiers()), (String)focusInputMap.get((KeyStroke)keys[i])); parentActionMap.put ((String)focusInputMap.get((KeyStroke)keys[i]), new ActionListenerProxy (action, (String)focusInputMap.get((KeyStroke)keys[i]))); } parentInputMap.setParent(list.getInputMap().getParent()); parentActionMap.setParent(list.getActionMap().getParent()); list.getInputMap().setParent(parentInputMap); list.getActionMap().setParent(parentActionMap); } |
parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), ((KeyStroke)keys[i]).getModifiers()), (String)focusInputMap.get((KeyStroke)keys[i])); parentActionMap.put ((String)focusInputMap.get((KeyStroke)keys[i]), new ActionListenerProxy (action, (String)focusInputMap.get((KeyStroke)keys[i]))); | parentActionMap.put (actionString, new ActionListenerProxy(action, actionString)); | protected void installKeyboardActions() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); InputMap focusInputMap = (InputMap)defaults.get("List.focusInputMap"); InputMapUIResource parentInputMap = new InputMapUIResource(); // FIXME: The JDK uses a LazyActionMap for parentActionMap ActionMap parentActionMap = new ActionMap(); action = new ListAction(); Object keys[] = focusInputMap.allKeys(); // Register key bindings in the UI InputMap-ActionMap pair // Note that we register key bindings with both the old and new modifier // masks: InputEvent.SHIFT_MASK and InputEvent.SHIFT_DOWN_MASK and so on. for (int i = 0; i < keys.length; i++) { parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), convertModifiers (((KeyStroke)keys[i]).getModifiers())), (String)focusInputMap.get((KeyStroke)keys[i])); parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), ((KeyStroke)keys[i]).getModifiers()), (String)focusInputMap.get((KeyStroke)keys[i])); parentActionMap.put ((String)focusInputMap.get((KeyStroke)keys[i]), new ActionListenerProxy (action, (String)focusInputMap.get((KeyStroke)keys[i]))); } parentInputMap.setParent(list.getInputMap().getParent()); parentActionMap.setParent(list.getActionMap().getParent()); list.getInputMap().setParent(parentInputMap); list.getActionMap().setParent(parentActionMap); } |
public static Border createBevelBorder (int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) | public static Border createBevelBorder(int type) | public static Border createBevelBorder (int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) { return new BevelBorder (type, highlightOuter, highlightInner, shadowOuter, shadowInner); } |
return new BevelBorder (type, highlightOuter, highlightInner, shadowOuter, shadowInner); | return new BevelBorder(type); | public static Border createBevelBorder (int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) { return new BevelBorder (type, highlightOuter, highlightInner, shadowOuter, shadowInner); } |
public static Border createEmptyBorder (int top, int left, int bottom, int right) | public static Border createEmptyBorder() | public static Border createEmptyBorder (int top, int left, int bottom, int right) { return new EmptyBorder (top, left, bottom, right); } |
return new EmptyBorder (top, left, bottom, right); | return new EmptyBorder(0, 0, 0, 0); | public static Border createEmptyBorder (int top, int left, int bottom, int right) { return new EmptyBorder (top, left, bottom, right); } |
public static Border createLineBorder (Color color, int thickness) | public static Border createLineBorder(Color color) | public static Border createLineBorder (Color color, int thickness) { return new LineBorder (color, thickness); } |
return new LineBorder (color, thickness); | return null; | public static Border createLineBorder (Color color, int thickness) { return new LineBorder (color, thickness); } |
public LineBorder(Color color, int thickness) | public LineBorder(Color color) | public LineBorder(Color color, int thickness) { this (color, thickness, /* roundedCorners */ false); } |
this (color, thickness, false); | this(color, 1, false); | public LineBorder(Color color, int thickness) { this (color, thickness, /* roundedCorners */ false); } |
public Image createImage (int width, int height) | public Image createImage(ImageProducer producer) | public Image createImage (int width, int height) { Image returnValue = null; if (!GraphicsEnvironment.isHeadless ()) { if (isLightweight () && parent != null) returnValue = parent.createImage (width, height); else if (peer != null) returnValue = peer.createImage (width, height); } return returnValue; } |
Image returnValue = null; if (!GraphicsEnvironment.isHeadless ()) { if (isLightweight () && parent != null) returnValue = parent.createImage (width, height); else if (peer != null) returnValue = peer.createImage (width, height); } return returnValue; | if (peer != null) return peer.createImage(producer); else return getToolkit().createImage(producer); | public Image createImage (int width, int height) { Image returnValue = null; if (!GraphicsEnvironment.isHeadless ()) { if (isLightweight () && parent != null) returnValue = parent.createImage (width, height); else if (peer != null) returnValue = peer.createImage (width, height); } return returnValue; } |
Button(String label) | Button() | Button(String label){ this.label = label; actionCommand = label; if (GraphicsEnvironment.isHeadless ()) throw new HeadlessException ();} |
this.label = label; actionCommand = label; if (GraphicsEnvironment.isHeadless ()) throw new HeadlessException (); | this(""); | Button(String label){ this.label = label; actionCommand = label; if (GraphicsEnvironment.isHeadless ()) throw new HeadlessException ();} |
Scrollbar(int orientation) throws IllegalArgumentException | Scrollbar() | Scrollbar(int orientation) throws IllegalArgumentException{ this(orientation, 0, 10, 0, 100);} |
this(orientation, 0, 10, 0, 100); | this(VERTICAL); | Scrollbar(int orientation) throws IllegalArgumentException{ this(orientation, 0, 10, 0, 100);} |
public JCheckBox(String text) { super(text); | public JCheckBox() { super(); | public JCheckBox(String text) { super(text); init(); } |
public JNodeBufferedImageGraphics(BufferedImage image) { super(new BufferedImageSurface(image), image.getWidth(), image.getHeight()); this.image = image; | public JNodeBufferedImageGraphics(JNodeBufferedImageGraphics src) { super(src); this.image = src.image; | public JNodeBufferedImageGraphics(BufferedImage image) { super(new BufferedImageSurface(image), image.getWidth(), image.getHeight()); this.image = image; } |
public JTextPane() { } | public JTextPane() { setEditorKit(createDefaultEditorKit()); setDocument(null); } | public JTextPane() { // TODO } // JTextPane() |
public Style addStyle(String nm, Style parent) { return null; } | public Style addStyle(String nm, Style parent) { return getStyledDocument().addStyle(nm, parent); } | public Style addStyle(String nm, Style parent) { return null; // TODO } // addStyle() |
protected EditorKit createDefaultEditorKit() { return super.createDefaultEditorKit(); } | protected EditorKit createDefaultEditorKit() { return new StyledEditorKit(); } | protected EditorKit createDefaultEditorKit() { return super.createDefaultEditorKit(); // TODO } // createDefaultEditorKit() |
public AttributeSet getCharacterAttributes() { return null; } | public AttributeSet getCharacterAttributes() { StyledDocument doc = getStyledDocument(); Element el = doc.getCharacterElement(getCaretPosition()); return el.getAttributes(); } | public AttributeSet getCharacterAttributes() { return null; // TODO } // getCharacterAttributes() |
public MutableAttributeSet getInputAttributes() { return null; } | public MutableAttributeSet getInputAttributes() { return getStyledEditorKit().getInputAttributes(); } | public MutableAttributeSet getInputAttributes() { return null; // TODO } // getInputAttributes() |
public Style getLogicalStyle() { return null; } | public Style getLogicalStyle() { return getStyledDocument().getLogicalStyle(getCaretPosition()); } | public Style getLogicalStyle() { return null; // TODO } // getLogicalStyle() |
public AttributeSet getParagraphAttributes() { return null; } | public AttributeSet getParagraphAttributes() { StyledDocument doc = getStyledDocument(); Element el = doc.getParagraphElement(getCaretPosition()); return el.getAttributes(); } | public AttributeSet getParagraphAttributes() { return null; // TODO } // getParagraphAttributes() |
public Style getStyle(String nm) { return null; } | public Style getStyle(String nm) { return getStyledDocument().getStyle(nm); } | public Style getStyle(String nm) { return null; // TODO } // getStyle() |
public StyledDocument getStyledDocument() { return null; } | public StyledDocument getStyledDocument() { return (StyledDocument) super.getDocument(); } | public StyledDocument getStyledDocument() { return null; // TODO } // getStyledDocument() |
protected final StyledEditorKit getStyledEditorKit() { return null; } | protected final StyledEditorKit getStyledEditorKit() { return (StyledEditorKit) getEditorKit(); } | protected final StyledEditorKit getStyledEditorKit() { return null; // TODO } // getStyledEditorKit() |
public String getUIClassID() { return uiClassID; } | public String getUIClassID() { return "TextPaneUI"; } | public String getUIClassID() { return uiClassID; } // getUIClassID() |
public void removeStyle(String nm) { } | public void removeStyle(String nm) { getStyledDocument().removeStyle(nm); } | public void removeStyle(String nm) { // TODO } // removeStyle() |
public void replaceSelection(String content) { super.replaceSelection(content); } | public void replaceSelection(String content) { Caret caret = getCaret(); StyledDocument doc = getStyledDocument(); int dot = caret.getDot(); int mark = caret.getMark(); if (content == null) { caret.setDot(dot); return; } try { int start = getSelectionStart(); int end = getSelectionEnd(); int contentLength = content.length(); if (dot != mark) doc.remove(start, end - start); doc.insertString(start, content, null); doc.setCharacterAttributes(start, contentLength, getInputAttributes(), true); setCaretPosition(start + contentLength); } catch (BadLocationException e) { throw new AssertionError ("No BadLocationException should be thrown here"); } } | public void replaceSelection(String content) { super.replaceSelection(content); // TODO } // replaceSelection() |
boolean replace) { } | boolean replace) { int dot = getCaret().getDot(); int start = getSelectionStart(); int end = getSelectionEnd(); if (start == dot && end == dot) { MutableAttributeSet inputAttributes = getStyledEditorKit().getInputAttributes(); inputAttributes.addAttributes(attribute); } else getStyledDocument().setCharacterAttributes(start, end - start, attribute, replace); } | public void setCharacterAttributes(AttributeSet attribute, boolean replace) { // TODO } // setCharacterAttributes() |
public void setDocument(Document document) { super.setDocument(document); } | public void setDocument(Document document) { if (document != null && !(document instanceof StyledDocument)) throw new IllegalArgumentException ("JTextPane can only handle StyledDocuments"); setStyledDocument((StyledDocument) document); } | public void setDocument(Document document) { super.setDocument(document); // TODO } // setDocument() |
public final void setEditorKit(EditorKit editor) { super.setEditorKit(editor); } | public final void setEditorKit(EditorKit editor) { if (!(editor instanceof StyledEditorKit)) throw new IllegalArgumentException ("JTextPanes can only handle StyledEditorKits"); super.setEditorKit(editor); } | public final void setEditorKit(EditorKit editor) { super.setEditorKit(editor); // TODO } // setEditorKit() |
public void setLogicalStyle(Style style) { } | public void setLogicalStyle(Style style) { getStyledDocument().setLogicalStyle(getCaretPosition(), style); } | public void setLogicalStyle(Style style) { // TODO } // setLogicalStyle() |
public void setStyledDocument(StyledDocument document) { } | public void setStyledDocument(StyledDocument document) { super.setDocument(document); } | public void setStyledDocument(StyledDocument document) { // TODO } // setStyledDocument() |
return BasicTextUI.this; | ViewFactory factory = null; EditorKit editorKit = BasicTextUI.this.getEditorKit(getComponent()); factory = editorKit.getViewFactory(); if (factory == null) factory = BasicTextUI.this; return factory; | public ViewFactory getViewFactory() { // FIXME: Handle EditorKit somehow. return BasicTextUI.this; } |
if (view == null) return null; return ((PlainView) view).modelToView(position, a, bias).getBounds(); | return ((View) view).modelToView(position, a, bias); | public Shape modelToView(int position, Shape a, Position.Bias bias) throws BadLocationException { if (view == null) return null; return ((PlainView) view).modelToView(position, a, bias).getBounds(); } |
v.setParent(null); | v.setParent(this); | public void setView(View v) { if (view != null) view.setParent(null); if (v != null) v.setParent(null); view = v; } |
view.setParent(rootView); | protected final void setView(View view) { rootView.setView(view); view.setParent(rootView); } |
|
log.info("screen updated -> " + sr + ", " + sc + ", " + er + ", " + ec); | public void onScreenChanged(int which, int sr, int sc, int er, int ec) {// workR.setBounds(sr, sc, ec, er);// if (screen.cursorShown)// this.drawCursor(); if (which == 3 || which == 4) {// log.info("cursor updated -> " + sr + ", " + sc + "-> active " +// screen.cursorActive + " -> shown " + screen.cursorShown); drawCursor(sr,sc); return; } if (hotSpots) screen.checkHotSpots(); log.info("screen updated -> " + sr + ", " + sc + ", " + er + ", " + ec); int rows = er - sr; int cols = 0; int lc = 0;// int lenScreen = screen.getScreenLength(); int lr = screen.getPos(sr,sc); int numCols = screen.getCols(); updateRect = new Data (sr,sc,er,ec); int clipX; int clipY; int clipWidth; int clipHeight; Rectangle clipper = new Rectangle(); int pos = 0;// while (rows-- >= 0) {// cols = ec - sc;// lc = lr;// while (cols-- >= 0) {// if (lc >= 0 && lc < lenScreen) {// drawChar(gg2d,pos++,screen.getRow(lc),screen.getCol(lc));// // drawChar(gg2d,pos++,sr-rows,lc);// lc++;// }// }// lr += numCols;// } lc = ec; clipper.x = sc * columnWidth; clipper.y = sr * rowHeight; clipper.width = ((ec - sc) + 1) * columnWidth; clipper.height = ((er - sr ) + 1) * rowHeight; gg2d.setClip(clipper.getBounds()); gg2d.setColor(colorBg); // System.out.println("PaintComponent " + r); gg2d.fillRect(clipper.x, clipper.y, clipper.width, clipper.height); while (sr <= er) { cols = ec - sc; lc = sc; while (cols-- >= 0) { if (sc + cols <= ec) {// drawChar(gg2d,pos++,screen.getRow(lc),screen.getCol(lc)); drawChar(gg2d,pos++,sr,lc);// if (clipper == null) {// clipper = new Rectangle(workR);// }// else {// clipper.union(workR);// } lc++; } } sr++; }// System.out.println(" clipping from screen change " + clipper// + " clipping region of paint " + gg2d.getClipBounds()); updateImage(clipper);// if (screen.cursorShown)// this.drawCursor();// screen.dumpScreen(); } |
|
drawOIA(); | public void resize(int width, int height) { if (bi.getWidth() != width || bi.getHeight() != height) {// synchronized (lock) { bi = null; bi = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB); this.width = width; this.height = height; resized = true; getSettings(); // tell waiting threads to wake up// lock.notifyAll();// } } drawOIA(); } |
|
public static TN5250jLogger getLogger (String clazzName) { TN5250jLogger logger = null; if (_loggers.containsKey(clazzName)) { logger = ( TN5250jLogger ) _loggers.get(clazzName); } else { if (customLogger != null) { try { Class classObject = Class.forName(customLogger); Object object = classObject.newInstance(); if (object instanceof TN5250jLogFactory) { logger = (TN5250jLogger) object; } } catch (Exception ex) { ; } } else { if (logger == null) { if (log4j) logger = new Log4jLogger(); else logger = new ConsoleLogger(); } logger.initialize(clazzName); _loggers.put(clazzName, logger); } } return logger; | public static TN5250jLogger getLogger (Class clazz) { return getLogger(clazz.getName()); | public static TN5250jLogger getLogger (String clazzName) { TN5250jLogger logger = null; if (_loggers.containsKey(clazzName)) { logger = ( TN5250jLogger ) _loggers.get(clazzName); } else { if (customLogger != null) { try { Class classObject = Class.forName(customLogger); Object object = classObject.newInstance(); if (object instanceof TN5250jLogFactory) { logger = (TN5250jLogger) object; } } catch (Exception ex) { ; } } else { if (logger == null) { if (log4j) logger = new Log4jLogger(); else // take the default logger. logger = new ConsoleLogger(); } logger.initialize(clazzName); _loggers.put(clazzName, logger); } } return logger; } |
System.out.println("Copyright 2005 Free Software Foundation, Inc."); | System.out.println("Copyright 2006 Free Software Foundation, Inc."); | public static void version() { System.out.println("rmiregistry (" + System.getProperty("java.vm.name") + ") " + System.getProperty("java.vm.version")); System.out.println("Copyright 2005 Free Software Foundation, Inc."); System.out.println("This is free software; see the source for copying conditions. There is NO"); System.out.println("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."); System.exit(0);} |
protected UnicastRemoteObject(RemoteRef ref) | protected UnicastRemoteObject() | protected UnicastRemoteObject(RemoteRef ref) throws RemoteException { super((UnicastServerRef) ref); exportObject(this); } |
super((UnicastServerRef) ref); exportObject(this); | this(0); | protected UnicastRemoteObject(RemoteRef ref) throws RemoteException { super((UnicastServerRef) ref); exportObject(this); } |
HashMap attributes = new HashMap(); attributes.put(DSSKeyPairGenerator.MODULUS_LENGTH, new Integer(keysize)); if (random != null) { attributes.put(DSSKeyPairGenerator.SOURCE_OF_RANDOMNESS, random); } adaptee.setup(attributes); | this.initialize(keysize, false, random); | public void initialize(int keysize, SecureRandom random) { HashMap attributes = new HashMap(); attributes.put(DSSKeyPairGenerator.MODULUS_LENGTH, new Integer(keysize)); if (random != null) { attributes.put(DSSKeyPairGenerator.SOURCE_OF_RANDOMNESS, random); } adaptee.setup(attributes); } |
public Argument(String name, String description) { this(name, description, SINGLE); | public Argument(String name, String description, boolean multi) { super(name, description); this.multi = multi; | public Argument(String name, String description) { this(name, description, SINGLE); } |
public void connect(javax.rmi.ORB orb) | public void connect(ORB orb) | public void connect(javax.rmi.ORB orb) throws RemoteException { if(delegate != null) delegate.connect(this, orb); } |
if(delegate != null) | if (m_orb != null && orb != null) { if (m_orb.equals(orb)) throw new RemoteException("Stub " + this + " is connected to another ORB, " + orb); else return; } m_orb = orb; | public void connect(javax.rmi.ORB orb) throws RemoteException { if(delegate != null) delegate.connect(this, orb); } |
public boolean equals(Object obj) | public boolean equals(java.lang.Object obj) | public boolean equals(Object obj) { if(delegate != null) return delegate.equals(this, obj); else return false; } |