Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5962941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:10:36+00:00 2026-05-22T19:10:36+00:00

Hello I want to fill an hashmap with value => key :idissue value:arraylist (list

  • 0

Hello
I want to fill an hashmap with value =>
key :idissue
value:arraylist (list of assignee)
The problem that my function return the same liste of assignee for all my issues:
My map{10700=[x,y,z], 10500=[x,y,z],10600=[x,y,z]…….

Or the result should be like this:
My map{10700=[x,y,z], 10500=[w,v,q,v,t,z],10600=[m,r,t,i]…….
I treid to clear my list listassignee.clear(); after the put instruction but in this case is empty :
My map{10700=[], 10500=[], 10601=[], 10400=[], 10401=[], 10301=[], 10300=[], 10600=[]}

Any suggestion please??

public HashMap<String ,ArrayList<String>> MAPAssigneeByissue() throws SQLException
{
    Issue iss =new Issue(); //a class return list of issue
    ArrayList<String> listassignee = new ArrayList<String>();

    HashMap<String ,ArrayList<String>> mapTicketassignee = new HashMap<String ,ArrayList<String>> ();


    Connectionx conn=new Connectionx();


    for (Iterator it = iss.getListissue().iterator();it.hasNext();)
    {
        Object o = (Object) it.next();

        String sql2;
        sql2=" my SQL:retrieve list assignee for each ticket (o.tostring) ";
        ResultSet rs2 = conn.st. executeQuery(sql2);

        while(rs2.next())
        {
            String str=  rs2.getString(1);
            listassignee.add(str);

        }
        mapTicketassignee.put(o.toString(),listassignee);
        //listassignee.clear();
    }

    System.out.println("My map"+mapTicketassignee.toString());
    return mapTicketassignee;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:10:37+00:00Added an answer on May 22, 2026 at 7:10 pm

    Every time you iterate trough
    listassignee = new ArrayList<String>()

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've written a small hello world test app in Silverlight which i want to
What I want is, I think, relatively simple: > Bin = <<Hello.world.howdy?>>. > split(Bin,
If given the route: {FeedName}/{ItemPermalink} ex: /Blog/Hello-World If the item doesn't exist, I want
I have the following string: <SEM>electric</SEM> cu <SEM>hello</SEM> rent <SEM>is<I>love</I>, <PARTITION />mind I want
Hello all i want to make my DrawingSurface view transparent. i tried many thing
I want a <textarea> to completely fill an absolutely-sized parent container, with padding in
Hello I want to forward port A of my host to port B of
Hello I want to calculate the throughput through C# using HttpWebRequest . I thought
Hello I want to replace the following chars within a string String a =
Hello I want to set the BorderColor of certain Item Renderers (textInput) of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.