directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [2/4] directory-kerby git commit: Avoid NPE
Date Fri, 02 Oct 2015 17:22:19 GMT
Avoid NPE


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/6ad69847
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/6ad69847
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/6ad69847

Branch: refs/heads/master
Commit: 6ad6984761eb3c40f40e03eb6475a8fbeb58f6bd
Parents: b283dec
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Wed Sep 30 12:21:53 2015 +0200
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed Sep 30 14:54:31 2015 +0200

----------------------------------------------------------------------
 .../org/apache/kerby/kerberos/kerb/spec/base/PrincipalName.java   | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/6ad69847/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/PrincipalName.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/PrincipalName.java
b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/PrincipalName.java
index 65cbe36..4bf6e0f 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/PrincipalName.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/PrincipalName.java
@@ -180,6 +180,9 @@ public class PrincipalName extends KrbSequenceType {
     }
 
     private void fromNameString(String nameString) {
+        if (nameString == null) {
+            return;
+        }
         String tmpRealm = null;
         List<String> nameStrings;
         int pos = nameString.indexOf('@');


Mime
View raw message