OpenJDK / jdk / jdk
changeset 7528:aae1ca8d088f
6992964: FindBugs warnings in com.sun.security.auth.module.UnixSystem.java
Reviewed-by: mullan
author | weijun |
---|---|
date | Mon, 06 Dec 2010 10:48:57 +0800 |
parents | 287acfa1a9f2 |
children | 226923903075 |
files | jdk/src/share/classes/com/sun/security/auth/module/NTSystem.java jdk/src/share/classes/com/sun/security/auth/module/SolarisSystem.java jdk/src/share/classes/com/sun/security/auth/module/UnixSystem.java |
diffstat | 3 files changed, 6 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/jdk/src/share/classes/com/sun/security/auth/module/NTSystem.java Mon Dec 06 10:48:20 2010 +0800 +++ b/jdk/src/share/classes/com/sun/security/auth/module/NTSystem.java Mon Dec 06 10:48:57 2010 +0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,6 @@ package com.sun.security.auth.module; -import javax.security.auth.login.LoginException; - /** * <p> This class implementation retrieves and makes available NT * security information for the current user. @@ -124,7 +122,7 @@ * @return the group SIDs for the current NT user. */ public String[] getGroupIDs() { - return groupIDs; + return groupIDs == null ? null : groupIDs.clone(); } /**
--- a/jdk/src/share/classes/com/sun/security/auth/module/SolarisSystem.java Mon Dec 06 10:48:20 2010 +0800 +++ b/jdk/src/share/classes/com/sun/security/auth/module/SolarisSystem.java Mon Dec 06 10:48:57 2010 +0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,9 +25,6 @@ package com.sun.security.auth.module; -import javax.security.auth.*; -import javax.security.auth.login.*; - /** * <p> This class implementation retrieves and makes available Solaris * UID/GID/groups information for the current user. @@ -92,6 +89,6 @@ * @return the supplementary groups for the current Solaris user. */ public long[] getGroups() { - return groups; + return groups == null ? null : groups.clone(); } }
--- a/jdk/src/share/classes/com/sun/security/auth/module/UnixSystem.java Mon Dec 06 10:48:20 2010 +0800 +++ b/jdk/src/share/classes/com/sun/security/auth/module/UnixSystem.java Mon Dec 06 10:48:57 2010 +0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,9 +25,6 @@ package com.sun.security.auth.module; -import javax.security.auth.*; -import javax.security.auth.login.*; - /** * <p> This class implementation retrieves and makes available Unix * UID/GID/groups information for the current user. @@ -92,6 +89,6 @@ * @return the supplementary groups for the current Unix user. */ public long[] getGroups() { - return groups; + return groups == null ? null : groups.clone(); } }