Ignore:
Timestamp:
2015-05-17T04:02:42+02:00 (5 years ago)
Author:
Don-vip
Message:

performance - remove useless boxing of boolean constants

Location:
trunk/src/org/openstreetmap/josm/io
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/NoteReader.java

    r8347 r8377  
    5555        private Action noteAction;
    5656        private Date commentCreateDate;
    57         private Boolean commentIsNew;
     57        private boolean commentIsNew;
    5858        private List<Note> notes;
    5959        private String commentText;
     
    119119                    commentIsNew = false;
    120120                } else {
    121                     commentIsNew = Boolean.valueOf(isNew);
     121                    commentIsNew = Boolean.parseBoolean(isNew);
    122122                }
    123123                break;
     
    145145                commentUsername = null;
    146146                commentCreateDate = null;
    147                 commentIsNew = null;
     147                commentIsNew = false;
    148148                commentText = null;
    149149            }
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java

    r8342 r8377  
    134134     * @param san SubjectAlternativeName extension (optional)
    135135     */
    136     private static X509Certificate generateCertificate(String dn, KeyPair pair, int days, String algorithm, String san) throws GeneralSecurityException, IOException {
     136    private static X509Certificate generateCertificate(String dn, KeyPair pair, int days, String algorithm, String san)
     137            throws GeneralSecurityException, IOException {
    137138        PrivateKey privkey = pair.getPrivate();
    138139        X509CertInfo info = new X509CertInfo();
     
    166167        CertificateExtensions ext = new CertificateExtensions();
    167168        // Critical: Not CA, max path len 0
    168         ext.set(BasicConstraintsExtension.NAME, new BasicConstraintsExtension(true, false, 0));
     169        ext.set(BasicConstraintsExtension.NAME, new BasicConstraintsExtension(Boolean.TRUE, false, 0));
    169170        // Critical: only allow TLS ("serverAuth" = 1.3.6.1.5.5.7.3.1)
    170         ext.set(ExtendedKeyUsageExtension.NAME, new ExtendedKeyUsageExtension(true,
     171        ext.set(ExtendedKeyUsageExtension.NAME, new ExtendedKeyUsageExtension(Boolean.TRUE,
    171172                new Vector<ObjectIdentifier>(Arrays.asList(new ObjectIdentifier("1.3.6.1.5.5.7.3.1")))));
    172173
     
    185186            }
    186187            // Non critical
    187             ext.set(SubjectAlternativeNameExtension.NAME, new SubjectAlternativeNameExtension(false, gnames));
     188            ext.set(SubjectAlternativeNameExtension.NAME, new SubjectAlternativeNameExtension(Boolean.FALSE, gnames));
    188189        }
    189190
Note: See TracChangeset for help on using the changeset viewer.