ptg11539634
ptg11539634
Java
™
Coding Guidelines
ptg11539634
T
he SEI Series in Software Engineering is a collaborative undertaking of the
Carnegie Mellon Software Engineering Institute (SEI) and Addison-Wesley to develop
and publish books on software engineering and related topics. The common goal of the
SEI and Addison-Wesley is to provide the most current information on these topics in a
form that is easily usable by practitioners and students.
Titles in the series describe frameworks, tools, methods, and technologies designed to
help organizations, teams, and individuals improve their technical or management capa-
bilities. Some books describe processes and practices for developing higher-quality soft-
ware, acquiring programs for complex systems, or delivering services more eectively.
Other books focus on software and system architecture and product-line development.
Still others, from the SEI’s CERT Program, describe technologies and practices needed
to manage software and network security risk. These and all titles in the series address
critical problems in software engineering for which practical solutions are available.
Visit informit.com/sei for a complete list of available publications.
The SEI Series in Software Engineering
Software Engineering Institute of Carnegie Mellon University and Addison-Wesley
Make sure to connect with us!
informit.com/socialconnect
ptg11539634
iii
Upper Saddle River, NJ • Boston • Indianapolis • San Francisco
New York • Toronto • Montreal • London • Munich • Paris • Madrid
Capetown • Sydney • Tokyo • Singapore • Mexico City
Java
™
Coding Guidelines
75 Recommendations for
Reliable and Secure Programs
Fred Long
Dhruv Mohindra
Robert C. Seacord
Dean F. Sutherland
David Svoboda
T
he SEI Series in Software Engineering is a collaborative undertaking of the
Carnegie Mellon Software Engineering Institute (SEI) and Addison-Wesley to develop
and publish books on software engineering and related topics. The common goal of the
SEI and Addison-Wesley is to provide the most current information on these topics in a
form that is easily usable by practitioners and students.
Titles in the series describe frameworks, tools, methods, and technologies designed to
help organizations, teams, and individuals improve their technical or management capa-
bilities. Some books describe processes and practices for developing higher-quality soft-
ware, acquiring programs for complex systems, or delivering services more eectively.
Other books focus on software and system architecture and product-line development.
Still others, from the SEI’s CERT Program, describe technologies and practices needed
to manage software and network security risk. These and all titles in the series address
critical problems in software engineering for which practical solutions are available.
Visit informit.com/sei for a complete list of available publications.
The SEI Series in Software Engineering
Software Engineering Institute of Carnegie Mellon University and Addison-Wesley
Make sure to connect with us!
informit.com/socialconnect
ptg11539634
The SEI Series in Software Engineering
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim,
the designations have been printed with initial capital letters or in all capitals.
CMM, CMMI, Capability Maturity Model, Capability Maturity Modeling, Carnegie Mellon, CERT, and CERT
Coordination Center are registered in the U.S. Patent and Trademark Ofce by Carnegie Mellon University.
ATAM; Architecture Tradeoff Analysis Method; CMM Integration; COTS Usage-Risk Evaluation; CURE; EPIC;
Evolutionary Process for Integrating COTS Based Systems; Framework for Software Product Line Practice;
IDEAL; Interim Prole; OAR; OCTAVE; Operationally Critical Threat, Asset, and Vulnerability Evaluation;
Options Analysis for Reengineering; Personal Software Process; PLTP; Product Line Technical Probe; PSP;
SCAMPI; SCAMPI Lead Appraiser; SCAMPI Lead Assessor; SCE; SEI; SEPG; Team Software Process; and TSP
are service marks of Carnegie Mellon University.
The authors and publisher have taken care in the preparation of this book, but make no expressed or implied
warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for
incidental or consequential damages in connection with or arising out of the use of the information or
programs contained herein.
The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special
sales, which may include electronic versions and/or custom covers and content particular to your business,
training goals, marketing focus, and branding interests. For more information, please contact:
U.S. Corporate and Government Sales
(800) 382-3419
corpsales@pearsontechgroup.com
For sales outside the United States, please contact:
International Sales
international@pearsoned.com
Visit us on the Web: informit.com/aw
Library of Congress Cataloging-in-Publication Data
Long, Fred, 1947-
Java coding guidelines : 75 recommendations for reliable and secure programs / Fred Long, Dhruv Mohindra,
Robert C. Seacord, Dean F. Sutherland, David Svoboda.
pages cm.—(The SEI series in software engineering)
Includes bibliographical references and index.
ISBN 978-0-321-93315-7 (pbk. : alk. paper)
1. Java (Computer program language) 2. Computer programming. I. Title.
QA76.73.J38L66 2014
005.2'762—dc23
2013021384
Copyright © 2014 Pearson Education, Inc.
All rights reserved. Printed in the United States of America. This publication is protected by copyright, and
permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval
system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or
likewise. To obtain permission to use material from this work, please submit a written request to Pearson
Education, Inc., Permissions Department, One Lake Street, Upper Saddle River, New Jersey 07458, or you
may fax your request to (201) 236-3290.
ISBN-13: 978-0-321-93315-7
ISBN-10: 0-321-93315-X
Text printed in the United States on recycled paper at RR Donnelley in Crawfordsville, Indiana.
First printing, August 2013
- 1
- 2
- 3
前往页