rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if (currentValue != null) { | public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { if (! comboBox.isEditable()) { Object currentValue = comboBox.getSelectedItem(); boolean isPressed = arrowButton.getModel().isPressed(); if (currentValue != null) { Component comp = comboBox.getRenderer() ... | |
currentValue, | (currentValue != null ? currentValue : ""), | public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { if (! comboBox.isEditable()) { Object currentValue = comboBox.getSelectedItem(); boolean isPressed = arrowButton.getModel().isPressed(); if (currentValue != null) { Component comp = comboBox.getRenderer() ... |
} | public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) { if (! comboBox.isEditable()) { Object currentValue = comboBox.getSelectedItem(); boolean isPressed = arrowButton.getModel().isPressed(); if (currentValue != null) { Component comp = comboBox.getRenderer() ... | |
setBorder(tmpBorder); | public BasicArrowButton(int direction) { super(); setDirection(direction); setBorder(tmpBorder); } | |
listener = new ComboBoxEditorListener(); | public BasicComboBoxEditor() { editor = new JTextField(); editor.setBorder(null); editor.setColumns(9); listener = new ComboBoxEditorListener(); } | |
setHorizontalAlignment(SwingConstants.LEFT); | setOpaque(true); | public BasicComboBoxRenderer() { setHorizontalAlignment(SwingConstants.LEFT); setBorder(noFocusBorder); } |
public Rectangle(int x, int y, int width, int height) { this.x = x; this.y = y; this.width = width; this.height = height; | public Rectangle() { | public Rectangle(int x, int y, int width, int height) { this.x = x; this.y = y; this.width = width; this.height = height; } |
for (int i = 0; i < ncomponents; ++i) { if (component[i] == comp) { remove(i); break; } } | Component r = component[index]; r.removeNotify(); System.arraycopy(component, index + 1, component, index, ncomponents - index - 1); component[--ncomponents] = null; invalidate(); if (layoutMgr != null) layoutMgr.removeLayoutComponent(r); r.parent = null; ContainerEvent ce = new ContainerEvent(this, ContainerEve... | public void remove(Component comp) { synchronized (getTreeLock ()) { for (int i = 0; i < ncomponents; ++i) { if (component[i] == comp) { remove(i); break; } } } } |
pubKey = new GnuDSAPublicKey(((DSAPublicKey) pubKey).getY(), dsa.getP(), dsa.getQ(), dsa.getG()); | pubKey = new DSSPublicKey(Registry.X509_ENCODING_ID, dsa.getP(), dsa.getQ(), dsa.getG(), ((DSAPublicKey) pubKey).getY()); | public CertPathValidatorResult engineValidate(CertPath path, CertPathParameters params) throws CertPathValidatorException, InvalidAlgorithmParameterException { if (!(params instanceof PKIXParameters)) throw new InvalidAlgorithmParameterException("not a PKIXPa... |
if (DEBUG) debug("read val tag == " + val.getTag() + " len == " + val.getLength()); | if (Configuration.DEBUG) log.fine("read val tag == " + val.getTag() + " len == " + val.getLength()); | public Extension(byte[] encoded) throws IOException { this.encoded = (byte[]) encoded.clone(); DERReader der = new DERReader(encoded); // Extension ::= SEQUENCE { DERValue val = der.read(); if (DEBUG) debug("read val tag == " + val.getTag() + " len == " + val.getLength()); if (!val.isConstructed()... |
if (DEBUG) debug("read oid == " + oid); | if (Configuration.DEBUG) log.fine("read oid == " + oid); | public Extension(byte[] encoded) throws IOException { this.encoded = (byte[]) encoded.clone(); DERReader der = new DERReader(encoded); // Extension ::= SEQUENCE { DERValue val = der.read(); if (DEBUG) debug("read val tag == " + val.getTag() + " len == " + val.getLength()); if (!val.isConstructed()... |
if (DEBUG) debug("is critical == " + critical); | if (Configuration.DEBUG) log.fine("is critical == " + critical); | public Extension(byte[] encoded) throws IOException { this.encoded = (byte[]) encoded.clone(); DERReader der = new DERReader(encoded); // Extension ::= SEQUENCE { DERValue val = der.read(); if (DEBUG) debug("read val tag == " + val.getTag() + " len == " + val.getLength()); if (!val.isConstructed()... |
if (DEBUG) debug("read value == " + value); | if (Configuration.DEBUG) log.fine("read value == " + value); | public Extension(byte[] encoded) throws IOException { this.encoded = (byte[]) encoded.clone(); DERReader der = new DERReader(encoded); // Extension ::= SEQUENCE { DERValue val = der.read(); if (DEBUG) debug("read val tag == " + val.getTag() + " len == " + val.getLength()); if (!val.isConstructed()... |
public int compareTo(Date when) { return (getTime() < when.getTime()) ? -1 : (getTime() == when.getTime()) ? 0 : 1; | public int compareTo(Date when) { return (time < when.time) ? -1 : (time == when.time) ? 0 : 1; | public int compareTo(Date when) { return (getTime() < when.getTime()) ? -1 : (getTime() == when.getTime()) ? 0 : 1; } |
java.security.InvalidAlgorithmParameterException; | InvalidAlgorithmParameterException; | engineValidate(CertPath certPath, CertPathParameters params) throws CertPathValidatorException, java.security.InvalidAlgorithmParameterException; |
public Date() { this(System.currentTimeMillis()); | public Date() { time = System.currentTimeMillis(); | public Date() { this(System.currentTimeMillis()); } |
public abstract void checkValidity(Date date) | public abstract void checkValidity() | public abstract void checkValidity(Date date) throws CertificateExpiredException, CertificateNotYetValidException; |
public static boolean equals(Object[] a1, Object[] a2) | public static boolean equals(boolean[] a1, boolean[] a2) | public static boolean equals(Object[] a1, Object[] a2) { // Quick test which saves comparing elements of the same array, and also // catches the case that both are null. if (a1 == a2) return true; if (null == a1 || null == a2) return false; // If they're the same length, test each elemen... |
if (! AbstractCollection.equals(a1[i], a2[i])) | if (a1[i] != a2[i]) | public static boolean equals(Object[] a1, Object[] a2) { // Quick test which saves comparing elements of the same array, and also // catches the case that both are null. if (a1 == a2) return true; if (null == a1 || null == a2) return false; // If they're the same length, test each elemen... |
public void addIssuerName(Principal issuerName) throws IOException | public void addIssuerName(byte[] issuerName) throws IOException | public void addIssuerName(Principal issuerName) throws IOException { if (issuerName instanceof X500DistinguishedName) issuerNames.add(issuerName); else if (issuerName instanceof X500Principal) issuerNames.add(new X500DistinguishedName(((X500Principal) issuerName).getEncoded())); else issuerNa... |
if (issuerName instanceof X500DistinguishedName) issuerNames.add(issuerName); else if (issuerName instanceof X500Principal) issuerNames.add(new X500DistinguishedName(((X500Principal) issuerName).getEncoded())); else issuerNames.add(new X500DistinguishedName(issuerName.getName())); | issuerNames.add(new X500DistinguishedName(issuerName)); | public void addIssuerName(Principal issuerName) throws IOException { if (issuerName instanceof X500DistinguishedName) issuerNames.add(issuerName); else if (issuerName instanceof X500Principal) issuerNames.add(new X500DistinguishedName(((X500Principal) issuerName).getEncoded())); else issuerNa... |
public final Class getCategory() | public Class getCategory() | public final Class getCategory() { return JobImpressionsSupported.class; } |
public final String getName() | public String getName() | public final String getName() { return "job-impressions-supported"; } |
return groupid.equals(that.groupid) && classname.equals(that.classname) && location.equals(that.location) && data.equals(that.data) | return eq(groupid, that.groupid) && eq(classname, that.classname) && eq(location, that.location) && eq(data, that.data) | public boolean equals(Object obj) { if (obj instanceof ActivationDesc) { ActivationDesc that = (ActivationDesc) obj; return groupid.equals(that.groupid) && classname.equals(that.classname) && location.equals(that.location) && data.equals(that.data) ... |
return groupid.hashCode() ^ classname.hashCode() ^ location.hashCode() ^ data.hashCode(); | return hash(groupid) ^ hash(classname) ^ hash(location) ^ hash(data); | public int hashCode() { return groupid.hashCode() ^ classname.hashCode() ^ location.hashCode() ^ data.hashCode(); } |
public static ActivationGroupID currentGroupID() { throw new Error("Not implemented"); } | public static ActivationGroupID currentGroupID() { try { if (currentGroupId==null) { setSystem(ActivationSystemTransient.getInstance()); } } catch (ActivationException e) { InternalError ierr = new InternalError("Unable to activate AS"); ierr.initCause(e); throw ierr; } return currentGroupId; } | public static ActivationGroupID currentGroupID() { throw new Error("Not implemented");} |
return system.equals(that.system); | return uid.equals(that.uid); | public boolean equals(Object obj) { if (obj instanceof ActivationGroupID) { ActivationGroupID that = (ActivationGroupID) obj; return system.equals(that.system); } else return false; } |
return system.hashCode(); | return uid.hashCode(); | public int hashCode() { return system.hashCode(); } |
long write(ByteBuffer[] srcs) throws IOException; | long write(ByteBuffer[] srcs, int offset, int length) throws IOException; | long write(ByteBuffer[] srcs) throws IOException; |
clone() | public Object clone () throws CloneNotSupportedException | clone(){ try { return(super.clone()); } catch(Exception e) { return(null); }} |
String value = mimeString.substring(idx + paramName.length() + 2); | String value = mimeString.substring(idx + paramName.length() + 1); | getParameter(String paramName, String mimeString){ int idx = mimeString.indexOf(paramName + "="); if (idx == -1) return(null); String value = mimeString.substring(idx + paramName.length() + 2); idx = value.indexOf(" "); if (idx == -1) return(value); else return(value.substring(0, idx));} |
getReaderForText(Transferable transferable) throws UnsupportedFlavorException, IOException, UnsupportedEncodingException | public Reader getReaderForText(Transferable transferable) throws UnsupportedFlavorException, IOException | getReaderForText(Transferable transferable) throws UnsupportedFlavorException, IOException, UnsupportedEncodingException{ if (!transferable.isDataFlavorSupported(this)) throw new UnsupportedFlavorException(this... |
catch(Exception e) { } | catch(Exception e) { ; } | tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException{ try { return(Class.forName(className)); } catch(Exception e) { } // Commented out for Java 1.1 /* try { return(className.getClass().getClassLoader().findClass(className)); } catch(Exceptio... |
public abstract boolean isDataFlavorSupported(DataFlavor flavor); | boolean isDataFlavorSupported(DataFlavor flavor); | public abstract boolean isDataFlavorSupported(DataFlavor flavor); |
public abstract Object getTransferData(DataFlavor flavor) | Object getTransferData(DataFlavor flavor) | public abstract Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException; |
getParameter(String paramName) | getParameter(String paramName, String mimeString) | getParameter(String paramName){ return getParameter(paramName, mimeType);} |
return getParameter(paramName, mimeType); | int idx = mimeString.indexOf(paramName + "="); if (idx == -1) return(null); String value = mimeString.substring(idx + paramName.length() + 1); idx = value.indexOf(" "); if (idx == -1) return(value); else return(value.substring(0, idx)); | getParameter(String paramName){ return getParameter(paramName, mimeType);} |
this(s, null); | this(null, null); | public ClassNotFoundException(String s) { this(s, null); } |
if (style != null && val == DateFormat.DEFAULT) | if (styleIsPattern) | void setLocale (Locale loc) { if (type == null) ; else if (type.equals("number")) { formatClass = java.lang.Number.class; if (style == null) format = NumberFormat.getInstance(loc); else if (style.equals("currency")) format = NumberFormat.getCurrencyInstance(loc); else if (style.equals("percent"))... |
public Field(String name) | protected Field(String name) | public Field(String name) { super(name); } |
public static NumberFormat getCurrencyInstance (Locale loc) | public static final NumberFormat getCurrencyInstance () | public static NumberFormat getCurrencyInstance (Locale loc) { NumberFormat format; format = computeInstance (loc, "currencyFormat", "$#,##0.00;($#,##0.00)"); format.setMaximumFractionDigits(format.getCurrency().getDefaultFractionDigits()); return format; } |
NumberFormat format; format = computeInstance (loc, "currencyFormat", "$#,##0.00;($#,##0.00)"); format.setMaximumFractionDigits(format.getCurrency().getDefaultFractionDigits()); return format; | return getCurrencyInstance (Locale.getDefault()); | public static NumberFormat getCurrencyInstance (Locale loc) { NumberFormat format; format = computeInstance (loc, "currencyFormat", "$#,##0.00;($#,##0.00)"); format.setMaximumFractionDigits(format.getCurrency().getDefaultFractionDigits()); return format; } |
return hashcode; | return hashcodeCache; | public int hashCode() { return hashcode; } |
public static int parseInt(String s) | public static int parseInt(String str, int radix) | public static int parseInt(String s) { return parseInt(s, 10, false); } |
return parseInt(s, 10, false); | return parseInt(str, radix, false); | public static int parseInt(String s) { return parseInt(s, 10, false); } |
JRootPane() | public JRootPane() | JRootPane() { setLayout(createRootLayout()); getGlassPane(); getLayeredPane(); getContentPane(); setDoubleBuffered(true); updateUI(); } |
JComponent createContentPane() | protected JComponent createContentPane() | JComponent createContentPane() { JPanel p = new JPanel(); p.setName(this.getName()+".contentPane"); p.setLayout(new BorderLayout()); return p; } |
Component createGlassPane() | protected Component createGlassPane() | Component createGlassPane() { JPanel p = new JPanel(); p.setName(this.getName()+".glassPane"); p.setLayout(new BorderLayout()); p.setVisible(false); return p; } |
JLayeredPane createLayeredPane() | protected JLayeredPane createLayeredPane() | JLayeredPane createLayeredPane() { JLayeredPane l = new JLayeredPane(); l.setLayout(null); return l; } |
{ | public Container getContentPane() { if (contentPane == null) { setContentPane(createContentPane()); } return contentPane; } | |
} | public Container getContentPane() { if (contentPane == null) { setContentPane(createContentPane()); } return contentPane; } | |
JMenuBar getJMenuBar() { return menuBar; } | public JMenuBar getJMenuBar() { return menuBar; } | JMenuBar getJMenuBar() { return menuBar; } |
void setJMenuBar(JMenuBar m) | public void setJMenuBar(JMenuBar m) | void setJMenuBar(JMenuBar m) { menuBar = m; getLayeredPane().add(menuBar, JLayeredPane.FRAME_CONTENT_LAYER); } |
void addLayoutComponent(Component component, Object contraint); | void addLayoutComponent(Component component, Object contraints); | void addLayoutComponent(Component component, Object contraint); |
public Dimension getSize(Dimension d) | public Dimension getSize() | public Dimension getSize(Dimension d) { if (d == null) d = new Dimension(); d.width = width; d.height = height; return d; } |
if (d == null) d = new Dimension(); d.width = width; d.height = height; return d; | return size (); | public Dimension getSize(Dimension d) { if (d == null) d = new Dimension(); d.width = width; d.height = height; return d; } |
JLayeredPane() | public JLayeredPane() | JLayeredPane() { layers = new TreeMap (); componentToLayer = new Hashtable (); } |
protected abstract void shutdownInput () throws IOException; | protected void shutdownInput() throws IOException { throw new IOException("Not implemented in this socket class"); } | protected abstract void shutdownInput () throws IOException; |
protected abstract void shutdownOutput () throws IOException; | protected void shutdownOutput() throws IOException { throw new IOException("Not implemented in this socket class"); } | protected abstract void shutdownOutput () throws IOException; |
menuItem.setHorizontalTextPosition(SwingConstants.TRAILING); menuItem.setHorizontalAlignment(SwingConstants.LEADING); | protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); menuItem.setBackground(defaults.getColor("MenuItem.background")); menuItem.setBorder(defaults.getBorder("MenuItem.border")); menuItem.setFont(defaults.getFont("MenuItem.font")); menuItem.setForeground(defaults... | |
if (i != null) { i.paintIcon(c, g, vr.x, vr.y); vr.x += i.getIconWidth() + defaultTextIconGap; } SwingUtilities.layoutCompoundLabel(c, fm, m.getText(), m.getIcon(), | SwingUtilities.layoutCompoundLabel(c, fm, m.getText(), i, | protected void paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Rectangle tr = new Rectangle(); // text rectangle Rectangle ir = new R... |
if (i != null) i.paintIcon(c, g, ir.x, ir.y); | protected void paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Rectangle tr = new Rectangle(); // text rectangle Rectangle ir = new R... | |
if (path.length > selection.size ()) | if (path.length > selectedPath.size()) | public void setSelectedPath (MenuElement[] path) { if (path == null) { clearSelectedPath (); return; } int i; int minSize = path.length; // size of the smaller path. if (path.length > selection.size ()) { // if new selected path contains more elements then current ... |
for (i = selection.size (); i < path.length; i++) | for (i = selectedPath.size(); i < path.length; i++) | public void setSelectedPath (MenuElement[] path) { if (path == null) { clearSelectedPath (); return; } int i; int minSize = path.length; // size of the smaller path. if (path.length > selection.size ()) { // if new selected path contains more elements then current ... |
selection.add (path[i]); path[i].menuSelectionChanged (true); | selectedPath.add(path[i]); path[i].menuSelectionChanged(true); | public void setSelectedPath (MenuElement[] path) { if (path == null) { clearSelectedPath (); return; } int i; int minSize = path.length; // size of the smaller path. if (path.length > selection.size ()) { // if new selected path contains more elements then current ... |
minSize = selection.size (); | minSize = selectedPath.size(); | public void setSelectedPath (MenuElement[] path) { if (path == null) { clearSelectedPath (); return; } int i; int minSize = path.length; // size of the smaller path. if (path.length > selection.size ()) { // if new selected path contains more elements then current ... |
else if (path.length < selection.size ()) | else if (path.length < selectedPath.size()) | public void setSelectedPath (MenuElement[] path) { if (path == null) { clearSelectedPath (); return; } int i; int minSize = path.length; // size of the smaller path. if (path.length > selection.size ()) { // if new selected path contains more elements then current ... |
for (i = selection.size () - 1; i >= path.length; i--) | for (i = selectedPath.size() - 1; i >= path.length; i--) | public void setSelectedPath (MenuElement[] path) { if (path == null) { clearSelectedPath (); return; } int i; int minSize = path.length; // size of the smaller path. if (path.length > selection.size ()) { // if new selected path contains more elements then current ... |
((MenuElement) selection.get (i)).menuSelectionChanged (false); selection.remove (i); | ((MenuElement) selectedPath.get(i)).menuSelectionChanged(false); selectedPath.remove(i); | public void setSelectedPath (MenuElement[] path) { if (path == null) { clearSelectedPath (); return; } int i; int minSize = path.length; // size of the smaller path. if (path.length > selection.size ()) { // if new selected path contains more elements then current ... |
MenuElement oldSelection; | MenuElement oldSelectedPath; | public void setSelectedPath (MenuElement[] path) { if (path == null) { clearSelectedPath (); return; } int i; int minSize = path.length; // size of the smaller path. if (path.length > selection.size ()) { // if new selected path contains more elements then current ... |
oldSelection = (MenuElement) selection.get (i); | oldSelectedPath = (MenuElement) selectedPath.get(i); | public void setSelectedPath (MenuElement[] path) { if (path == null) { clearSelectedPath (); return; } int i; int minSize = path.length; // size of the smaller path. if (path.length > selection.size ()) { // if new selected path contains more elements then current ... |
if (path[i].equals (oldSelection)) | if (path[i].equals(oldSelectedPath)) | public void setSelectedPath (MenuElement[] path) { if (path == null) { clearSelectedPath (); return; } int i; int minSize = path.length; // size of the smaller path. if (path.length > selection.size ()) { // if new selected path contains more elements then current ... |
oldSelection.menuSelectionChanged (false); path[i].menuSelectionChanged (true); selection.setElementAt (path[i], i); | oldSelectedPath.menuSelectionChanged(false); path[i].menuSelectionChanged(true); selectedPath.setElementAt(path[i], i); | public void setSelectedPath (MenuElement[] path) { if (path == null) { clearSelectedPath (); return; } int i; int minSize = path.length; // size of the smaller path. if (path.length > selection.size ()) { // if new selected path contains more elements then current ... |
for (int i = 0; i < selection.size (); i++) ((MenuElement) selection.get (i)).menuSelectionChanged (false); | for (int i = selectedPath.size() - 1; i >= 0; i--) ((MenuElement) selectedPath.get(i)).menuSelectionChanged(false); | public void clearSelectedPath () { for (int i = 0; i < selection.size (); i++) ((MenuElement) selection.get (i)).menuSelectionChanged (false); selection.clear (); } |
selection.clear (); | fireStateChanged(); selectedPath.clear(); | public void clearSelectedPath () { for (int i = 0; i < selection.size (); i++) ((MenuElement) selection.get (i)).menuSelectionChanged (false); selection.clear (); } |
Component c = ((MenuElement) event.getSource ()).getComponent (); if (selection.size () == 0) | MenuElement[] path = getPath(c); ((MenuElement) c).processMouseEvent(event, path, manager); MenuElement[] subComponents = ((MenuElement) c).getSubElements(); for (int i = 0; i < subComponents.length; i++) | public void processMouseEvent (MouseEvent event) { Component c = ((MenuElement) event.getSource ()).getComponent (); if (selection.size () == 0) { ((MenuElement) event.getSource ()).processMouseEvent (event, getPath (c), ... |
((MenuElement) event.getSource ()).processMouseEvent (event, getPath (c), manager); return; } int i = 0; for (i = 0; i < selection.size (); i++) { MenuElement me = (MenuElement) selection.get (i); if (me.getComponent ().equals (c)) break; } Component subComp; for (int j = i; j < selection.size (); j++) { subComp = ... | if (subComponents[i] instanceof JMenuItem) subComponents[i].processMouseEvent(event, path, manager); | public void processMouseEvent (MouseEvent event) { Component c = ((MenuElement) event.getSource ()).getComponent (); if (selection.size () == 0) { ((MenuElement) event.getSource ()).processMouseEvent (event, getPath (c), ... |
stringWidth(String str) { | public int stringWidth(String str) { | stringWidth(String str){ char[] buf = new char[str.length()]; str.getChars(0, str.length(), buf, 0); return(charsWidth(buf, 0, buf.length));} |
return(charsWidth(buf, 0, buf.length)); } | return charsWidth(buf, 0, buf.length); } | stringWidth(String str){ char[] buf = new char[str.length()]; str.getChars(0, str.length(), buf, 0); return(charsWidth(buf, 0, buf.length));} |
getHeight() { return(getAscent() + getDescent() + getLeading()); } | public int getHeight() { return getAscent() + getDescent() + getLeading(); } | getHeight(){ return(getAscent() + getDescent() + getLeading());} |
return "NumPad-" + (char) (keyCode - VK_NUMPAD0); | return "NumPad-" + (keyCode - VK_NUMPAD0); | public static String getKeyText(int keyCode) { switch (keyCode) { case VK_CANCEL: return "Cancel"; case VK_BACK_SPACE: return "Backspace"; case VK_TAB: return "Tab"; case VK_ENTER: return "Enter"; case VK_CLEAR: return "Clear"; case VK_SHIFT: ... |
getFontMetrics(Font font); | getFontMetrics() { return(getFontMetrics(getFont())); } | getFontMetrics(Font font); |
getAscent() { return(1); } | public int getAscent() { return 1; } | getAscent(){ return(1);} |
if (!(g instanceof Graphics2D)) | if (!(g instanceof Graphics2D) || true) | public static void drawStringUnderlineCharAt(Graphics g, String text, int underlinedIndex, int x, int y) { Graphics2D g2; Rectangle2D.Double underline; FontRenderContext frc; FontMetrics fmet; LineMetrics lineM... |
public static String toString(int i) | public static String toString(int num, int radix) | public static String toString(int i) { // This is tricky: in libgcj, String.valueOf(int) is a fast native // implementation. In Classpath it just calls back to // Integer.toString(int, int). return String.valueOf(i); } |
return String.valueOf(i); | if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) radix = 10; char[] buffer = new char[33]; int i = 33; boolean isNeg = false; if (num < 0) { isNeg = true; num = -num; if (num < 0) { buffer[--i] = digits[(int) (-(num + radix) % radix)]; num = -(num / radix); } } do { buffer[--i] = digits[num % radix... | public static String toString(int i) { // This is tricky: in libgcj, String.valueOf(int) is a fast native // implementation. In Classpath it just calls back to // Integer.toString(int, int). return String.valueOf(i); } |
final String arch; | public static void insertSystemProperties(Properties res) { final String arch; final Vm vm = Vm.getVm(); arch = vm.getArch().getName(); // Java properties res.put("java.version", "1.1.0"); res.put("java.vendor", "JNode.org"); res.put("java.vendor.url", "http://jnode.org"); res.put("java.home", "/"); res.put("... | |
arch = vm.getArch().getName(); | final VmArchitecture arch = vm.getArch(); | public static void insertSystemProperties(Properties res) { final String arch; final Vm vm = Vm.getVm(); arch = vm.getArch().getName(); // Java properties res.put("java.version", "1.1.0"); res.put("java.vendor", "JNode.org"); res.put("java.vendor.url", "http://jnode.org"); res.put("java.home", "/"); res.put("... |
res.put("os.arch", arch); | res.put("os.arch", arch.getName()); | public static void insertSystemProperties(Properties res) { final String arch; final Vm vm = Vm.getVm(); arch = vm.getArch().getName(); // Java properties res.put("java.version", "1.1.0"); res.put("java.vendor", "JNode.org"); res.put("java.vendor.url", "http://jnode.org"); res.put("java.home", "/"); res.put("... |
res.put("gnu.cpu.endian", (arch.getByteOrder() == ByteOrder.BIG_ENDIAN) ? "big" : "little"); | public static void insertSystemProperties(Properties res) { final String arch; final Vm vm = Vm.getVm(); arch = vm.getArch().getName(); // Java properties res.put("java.version", "1.1.0"); res.put("java.vendor", "JNode.org"); res.put("java.vendor.url", "http://jnode.org"); res.put("java.home", "/"); res.put("... | |
if (failOnNewLoad) { throw new RuntimeException( "Cannot load a new class when failOnNewLoad is set (" + name + ")"); } | public VmType loadClass(String name, boolean resolve) throws ClassNotFoundException, PrivilegedActionPragma { // Also implement the java.lang.ClassLoader principals here // otherwise they cannot work in java.lang.ClassLoader. if ((parent != null) && !parent.skipParentLoader(name)) { ... | |
addFailedClassName(name); | public VmType loadClass(String name, boolean resolve) throws ClassNotFoundException, PrivilegedActionPragma { // Also implement the java.lang.ClassLoader principals here // otherwise they cannot work in java.lang.ClassLoader. if ((parent != null) && !parent.skipParentLoader(name)) { ... | |
public final Object newInstance(VmType cls, int size) { testInited(); if (cls.isArray()) { throw new IllegalArgumentException("Cannot instantiate an array like this"); } if (cls.isInterface()) { throw new IllegalArgumentException("Cannot instantiate an interface"); } final Object obj = allocObject((VmNormalClass) cls,... | public final Object newInstance(VmType cls) { cls.link(); return newInstance(cls, ((VmNormalClass)cls).getObjectSize()); | public final Object newInstance(VmType cls, int size) { testInited(); if (cls.isArray()) { throw new IllegalArgumentException("Cannot instantiate an array like this"); } if (cls.isInterface()) { throw new IllegalArgumentException("Cannot instantiate an interface"); } final Object obj = allocObject((VmNorma... |
size = normalClass.getObjSize(); | size = normalClass.getObjectSize(); | public final Object clone(Object object) { testInited(); final VmClassType objectClass = helper.getVmClass(object); final Address objectAddr = helper.addressOf(object); final int size; if (objectClass.isArray()) { final int slotSize = Unsafe.getCurrentProcessor().getArchitecture().getReferenceSize(); final Vm... |
public static void error(String msg, Throwable ex) { log(ERROR, System.err, msg, ex); | public static void error(String msg) { log(ERROR, System.err, msg, null); | public static void error(String msg, Throwable ex) { log(ERROR, System.err, msg, ex); } |
public String(byte[] data) | public String() | public String(byte[] data) { this(data, 0, data.length); } |
this(data, 0, data.length); | value = "".value; offset = 0; count = 0; | public String(byte[] data) { this(data, 0, data.length); } |
return Runtime.securityManager; | return SecurityManager.current; | public static SecurityManager getSecurityManager() { // Implementation note: the field lives in Runtime because of bootstrap // initialization issues. return Runtime.securityManager; } |
SecurityManager sm = Runtime.securityManager; | SecurityManager sm = SecurityManager.current; | public static Properties getProperties() { SecurityManager sm = Runtime.securityManager; // Be thread-safe. if (sm != null) sm.checkPropertiesAccess(); return properties; } |
return properties; | return SystemProperties.getProperties(); | public static Properties getProperties() { SecurityManager sm = Runtime.securityManager; // Be thread-safe. if (sm != null) sm.checkPropertiesAccess(); return properties; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.