From 83896588e20d7e532d0e2fdc17512772c29533a8 Mon Sep 17 00:00:00 2001
From: ulrich
Date: Fri, 04 Jun 2021 12:02:52 +0000
Subject: [PATCH] Kommentare um mit JavaDoc inkompatible Inhalte bereinigt

---
 src/de/uhilger/httpserver/auth/realm/User.java |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/de/uhilger/httpserver/auth/realm/User.java b/src/de/uhilger/httpserver/auth/realm/User.java
index 794d989..4a973e4 100644
--- a/src/de/uhilger/httpserver/auth/realm/User.java
+++ b/src/de/uhilger/httpserver/auth/realm/User.java
@@ -1,5 +1,5 @@
 /*
-  jwtTest - JSON Web Token Testimplementierung 
+  http-auth - Authentication Extensions to jdk.httpserver
   Copyright (C) 2021  Ulrich Hilger
 
   This program is free software: you can redistribute it and/or modify
@@ -25,7 +25,7 @@
 public class User {
   private String name;
   private String password;
-
+  
   public String getName() {
     return name;
   }
@@ -34,6 +34,7 @@
     this.name = name;
   }
 
+  
   public String getPassword() {
     return password;
   }
@@ -42,4 +43,18 @@
     this.password = password;
   }
   
+  @Override
+  public int hashCode() {
+    return this.getName().hashCode();
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if(obj instanceof User) {
+      return this.getName().equals(((User) obj).getName());
+    } else {
+      return false;
+    }
+  }
+  
 }

--
Gitblit v1.9.3