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

  • SEARCH
  • Home
  • 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 9242273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:32:52+00:00 2026-06-18T08:32:52+00:00

The following code: UnsortedReadableList collection = new UnsortedReadableList(); Vector messages = new Vector(); //

  • 0

The following code:

UnsortedReadableList collection = new UnsortedReadableList();
Vector messages = new Vector();

// ApplicationMessageImpl is simple implementation of 
// net.rim.blackberry.api.messagelist.ApplicationMessage interface
messages.addElement(new ApplicationMessageImpl("bla-bla"));
collection.loadFrom(messages);

produce IllegalArgumentException
enter image description here

Can someone help me to understand why? I can’t see any details in exception

Update

enter image description here

  • 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-06-18T08:32:54+00:00Added an answer on June 18, 2026 at 8:32 am

    The UnsortedReadableList.loadFrom()‘s JavaDoc states about the collection parameter:

    collection – New contents for this list; should be a ReadableSet, a
    ReadableList, an Object array, or an Enumeration.

    The Vector you’re providing as the parameter however isn’t one of the mentioned types. Vector.toArray() however does provide an Object[]. Therefore, I would try the following:

    UnsortedReadableList collection = new UnsortedReadableList();
    Vector messages = new Vector();
    
    // ApplicationMessageImpl is simple implementation of 
    // net.rim.blackberry.api.messagelist.ApplicationMessage interface
    messages.addElement(new ApplicationMessageImpl("bla-bla"));
    Object[] messageArray = new Object[messages.size()];
    messages.copyInto(messageArray));
    collection.loadFrom(messageArray);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following code is a pretty simple and complete JQuery Dialog. Everything works. Problem is
Following code example using alias declaration new in C++11 fails to compile with VC++
Following code SimpleDateFormat simpleDateFormat = new SimpleDateFormat(dd-MMM-yy, new DateFormatSymbols(Locale.US)); System.out.println(simpleDateFormat.parse(03-Apr-96)); Gives output as Wed
Following code is returning null statuses. FB.api(/me/statuses, function(response){ console.log(response); var statuses = $.parseJSON(response.data[0]); console.log(statuses);
Following code ProductPricesDataContext db = new ProductPricesDataContext(); var products = from p in db.Products
Following code working: function() { var Marker = new google.maps.Marker(); var MarkerOptions = {};
Following code is giving compilation error in visual studio 2009. #include <iterator> #include <vector>
Following code should throw exception to prevent adding duplicate collection item. ICollection<T> collection =
Following code is showing undefined in alert messages on clicking the radio buttons. What
Following code adds ParameterInspector to the endpoint. ChannelFactory<ITest> factory = new ChannelFactory<ITest>(BasicHttpBinding_ITest); OperationProfilerManager clientProfilerManager

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.