[svn] 1043: Bug: LCDS-184 - Concurrent modification exception thrown during remote subscription management

Revision: 1043
Author: [email protected]
Date: 2008-03-31 15:22:13 -0700 (Mon, 31 Mar 2008)
Log Message:
Bug: LCDS-184 - Concurrent modification exception thrown during remote subscription management
QA: Yes
Doc: No
Details:
Make the 'subscriptions' set in MessageClient/RemoteMessageClient concurrent modification safe.
Ticket Links:
http://bugs.adobe.com/jira/browse/LCDS-184
Modified Paths:
blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/services/messaging/RemoteMess ageClient.java

Similar Messages

  • [svn] 1044: Bug: LCDS-184 - Concurrent modification exception thrown during remote subscription management

    Revision: 1044
    Author: [email protected]
    Date: 2008-03-31 15:23:07 -0700 (Mon, 31 Mar 2008)
    Log Message:
    Bug: LCDS-184 - Concurrent modification exception thrown during remote subscription management
    QA: Yes
    Doc: No
    Details:
    Make the 'subscriptions' set in MessageClient/RemoteMessageClient concurrent modification safe.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/LCDS-184
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/MessageClient.java

  • [svn] 1013: Bug: LCDS-180 - [WebLogic 10.1 on Suse9] MxUnit Dynamic destination "SecurityEmployeeUser" test fails with a NullPointerException

    Revision: 1013
    Author: [email protected]
    Date: 2008-03-28 17:24:25 -0700 (Fri, 28 Mar 2008)
    Log Message:
    Bug: LCDS-180 - [WebLogic 10.1 on Suse9] MxUnit Dynamic destination "SecurityEmployeeUser" test fails with a NullPointerException
    QA: Yes
    Doc: No
    Details:
    This prevents the NPE but for non-servlet endpoints you need to be sure to define your users/roles in Weblogic's default security realm. The test was failing because login was failing, most likely because the regression server wasn't fully configured.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/LCDS-180
    Modified Paths:
    blazeds/branches/3.0.x/modules/opt/src/weblogic/flex/messaging/security/WeblogicLoginComm and.java

  • [svn] 1720: Bugs: LCDS-304 - Authentication not working in all cases when using security constraint with NIO endpoints .

    Revision: 1720
    Author: [email protected]
    Date: 2008-05-14 14:50:06 -0700 (Wed, 14 May 2008)
    Log Message:
    Bugs: LCDS-304 - Authentication not working in all cases when using security constraint with NIO endpoints.
    QA: Yes
    Doc: No
    Details:
    Update to the TomcatLoginCommand to work correctly with NIO endpoints.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/LCDS-304
    Modified Paths:
    blazeds/branches/3.0.x/modules/opt/src/tomcat/flex/messaging/security/TomcatLoginCommand. java

    Revision: 1720
    Author: [email protected]
    Date: 2008-05-14 14:50:06 -0700 (Wed, 14 May 2008)
    Log Message:
    Bugs: LCDS-304 - Authentication not working in all cases when using security constraint with NIO endpoints.
    QA: Yes
    Doc: No
    Details:
    Update to the TomcatLoginCommand to work correctly with NIO endpoints.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/LCDS-304
    Modified Paths:
    blazeds/branches/3.0.x/modules/opt/src/tomcat/flex/messaging/security/TomcatLoginCommand. java

  • [svn] 4804: Bugs: LCDS-548: add code to deal with contentType="application/ xml" with one parameter (avoid

    Revision: 4804
    Author: [email protected]
    Date: 2009-02-02 17:56:22 -0800 (Mon, 02 Feb 2009)
    Log Message:
    Bugs: LCDS-548: add code to deal with contentType="application/xml" with one parameter (avoid
    name/value encoding in that case)
    LCDS-405: baseURL on HTTPMultiService should accept URLs which start with "/"
    Added convertParametersHandler and convertResultsHandler function hooks to RemoteObject
    to support framework code which wants to modify the service behavior.
    Moved "properties" from rpc/http/AbstractOperation to rpc/AbstractOperation so we can use
    it for customizing the handling of remote object results
    Couple of minor ASDoc fixes and one tab -> spaces change
    Doc: minor asdoc edits
    QE: LCDS QE will verify the bugs in this one
    Reviewers: Mete, Pete, Seth, Ed reviewed different parts of this checkin
    Ticket Links:
    http://bugs.adobe.com/jira/browse/LCDS-548
    http://bugs.adobe.com/jira/browse/LCDS-405
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractInvoker.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractOperation.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPMultiService.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/Operation.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/Operation.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/RemoteObject.as

    Hello,
    How about this as an alternative:
    Use a functional global which has 3 cases:
    1. open config file - it opens the config file and reads the contents into a string (which is the functional global data), and you only do this one time at the beginning of the program.
    2. edit config data - it edits the string, which are really the contents of the file, but doesn't worry about writing to the file.  you could even get fancy here, and allow an array of tags and an array of values as input, and it would go update/edit all the tags to have the corresponding values.
    3.  close config file - it writes the current string data (the functional global data) to the file and closes it.
    Using the functions in the string palette, I think you'll find most of the code for that module/functional global will be easy to write.
    I hope this helps!
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • [svn] 4226: Bug: LCDS-517 - Reliable messaging destinations created using runtime configuration (bootstrap service) not working.

    Revision: 4226<br />Author:   [email protected]<br />Date:     2008-12-03 15:25:17 -0800 (Wed, 03 Dec 2008)<br /><br />Log Message:<br />-----------<br />Bug: LCDS-517 - Reliable messaging destinations created using runtime configuration (bootstrap service) not working. <br />QA: Yes<br />Doc: No<br />Checkintests Pass: Yes<br /><br />Details:<br />* Make sure the <reliable/> option is treated as a nested element rather than an attribute of its parent <network> element.<br /><br />Ticket Links:<br />------------<br />    http://bugs.adobe.com/jira/browse/LCDS-517<br /><br />Modified Paths:<br />--------------<br />    blazeds/trunk/modules/core/src/flex/messaging/Destination.java

    Revision: 4226<br />Author:   [email protected]<br />Date:     2008-12-03 15:25:17 -0800 (Wed, 03 Dec 2008)<br /><br />Log Message:<br />-----------<br />Bug: LCDS-517 - Reliable messaging destinations created using runtime configuration (bootstrap service) not working. <br />QA: Yes<br />Doc: No<br />Checkintests Pass: Yes<br /><br />Details:<br />* Make sure the <reliable/> option is treated as a nested element rather than an attribute of its parent <network> element.<br /><br />Ticket Links:<br />------------<br />    http://bugs.adobe.com/jira/browse/LCDS-517<br /><br />Modified Paths:<br />--------------<br />    blazeds/trunk/modules/core/src/flex/messaging/Destination.java

  • [svn] 4195: Bug: LCDS-517 - Reliable messaging destinations created using runtime configuration (bootstrap service) not working.

    Revision: 4195
    Author: [email protected]
    Date: 2008-11-26 13:08:23 -0800 (Wed, 26 Nov 2008)
    Log Message:
    Bug: LCDS-517 - Reliable messaging destinations created using runtime configuration (bootstrap service) not working.
    QA: Yes
    Doc: No
    Checkintests Pass: Yes
    Ticket Links:
    http://bugs.adobe.com/jira/browse/LCDS-517
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as

    Revision: 4195
    Author: [email protected]
    Date: 2008-11-26 13:08:23 -0800 (Wed, 26 Nov 2008)
    Log Message:
    Bug: LCDS-517 - Reliable messaging destinations created using runtime configuration (bootstrap service) not working.
    QA: Yes
    Doc: No
    Checkintests Pass: Yes
    Ticket Links:
    http://bugs.adobe.com/jira/browse/LCDS-517
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as

  • Concurrent modification exception inside fully synchronized code

    Hello,
    We have a private list
    private LinkedList<ConnectionChannel> channels = new LinkedList<ConnectionChannel>();that is accessed by multiple threads. One is traversing the items and operating on them, while another thread is adding and removing items to the list. Each such access to the list is protected with
    synchronized(channels) {
    } scopes so that no simultanious access to this list is possible.
    We do however get Concurrent Modification excpetions on this list when we do performance tests with heavy load on the sun server + heavy load on the java server itself. I cannot understand this problem in any other way that this must be a problem with the virtual machine! I know you guys probably will object to this furiously, but I am 100% sure that there is no logical error in my code.
    We're running on jre 1.5..0_03. uname -a on my solaris host gives me:
    SunOS trinity 5.8 Generic_108528-27 sun4u sparc SUNW,Sun-Fire-480R.
    Best regards,
    Helge Fredriksen

    I'm very sure about this, yes. Here's all blocks where the list is used:
            synchronized (channels) {
                logger.info("Connecting observer channel from client at " + token.getSource());
                channels.add(new ConnectionChannel(token, globalObserver));
           synchronized (channels) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Sending local event to processing in " + channels.size() + " parallel channel(s)");
                for (ConnectionChannel connectionChanel : channels) {
                    connectionChanel.send(event);
            synchronized (channels) {
                for (Iterator<ConnectionChannel> iterator = channels.iterator(); iterator.hasNext();) {
                    ConnectionChannel connectionChannel = iterator.next();
                    if (connectionChannel.getToken().getId().equals(token.getId())) {
                        iterator.remove();
                        logger.info("Removing connection channel to " + token.getSource());
                        return;
            }and
            synchronized (channels) {
                for (ConnectionChannel channel : channels) {
                    channel.flush(5000);
            }

  • [svn] 4193: Bug: LCDS-517 - Reliable messaging destinations created using runtime configuration (bootstrap service) not working.

    Revision: 4193
    Author: [email protected]
    Date: 2008-11-26 11:40:05 -0800 (Wed, 26 Nov 2008)
    Log Message:
    Bug: LCDS-517 - Reliable messaging destinations created using runtime configuration (bootstrap service) not working.
    QA: Yes
    Doc: No
    Checkintests Pass: Yes
    Details:
    * Foundational update to include destination config in what we collect for runtime config exchange with new clients for destinations with network/reliable=true (LCDS only).
    * Also typo in comment in AbstractConnectionAwareSession fixed.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/LCDS-517
    Modified Paths:
    blazeds/trunk/modules/core/src/flex/messaging/AbstractConnectionAwareSession.java
    blazeds/trunk/modules/core/src/flex/messaging/Destination.java
    blazeds/trunk/modules/core/src/flex/messaging/services/AbstractService.java

    Revision: 4193
    Author: [email protected]
    Date: 2008-11-26 11:40:05 -0800 (Wed, 26 Nov 2008)
    Log Message:
    Bug: LCDS-517 - Reliable messaging destinations created using runtime configuration (bootstrap service) not working.
    QA: Yes
    Doc: No
    Checkintests Pass: Yes
    Details:
    * Foundational update to include destination config in what we collect for runtime config exchange with new clients for destinations with network/reliable=true (LCDS only).
    * Also typo in comment in AbstractConnectionAwareSession fixed.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/LCDS-517
    Modified Paths:
    blazeds/trunk/modules/core/src/flex/messaging/AbstractConnectionAwareSession.java
    blazeds/trunk/modules/core/src/flex/messaging/Destination.java
    blazeds/trunk/modules/core/src/flex/messaging/services/AbstractService.java

  • [svn] 4323: Bug: LCDS-544 - Scenario where two components have seperate channel sets with overlapping channels not working .

    Revision: 4323
    Author: [email protected]
    Date: 2008-12-15 19:23:10 -0800 (Mon, 15 Dec 2008)
    Log Message:
    Bug: LCDS-544 - Scenario where two components have seperate channel sets with overlapping channels not working.
    QA: Yes
    Doc: No
    Checkintests Pass: Yes
    Details:
    * Hunting to a new channel within a channelset never triggered a disconnect from the previous channel(s). This isn't a problem in general, but does becomes a problem when an app defines two distinct channelsets containing at least one shared channel at the head of the list. In this case, the first channelset hunts past it and connects on a later channel. But when the second channelset hunts through (triggering a connect fault when it hits that initial shared channel that can't connect), the fault is processed by the first channelset as well (incorrectly).
    Ticket Links:
    http://bugs.adobe.com/jira/browse/LCDS-544
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as

    Running the script by python2 solves it for me:
    su - mythtv -c "nice -n 19 python2 /usr/bin/tv_grab_nl_py --output ~/listings.xml"
    Best regards,
    Cedric

  • [svn] 4258: Bug: LCDS-522 - Add more configurable reconnect handling for connecting up again over the same channel when there is a connection failure /outage.

    Revision: 4258
    Author: [email protected]
    Date: 2008-12-08 16:33:17 -0800 (Mon, 08 Dec 2008)
    Log Message:
    Bug: LCDS-522 - Add more configurable reconnect handling for connecting up again over the same channel when there is a connection failure/outage.
    QA: Yes
    Doc: No
    Checkintests Passes: Yes
    Details:
    * Updates to configuration handling code and MXMLC code-gen to support new long-duration reliable reconnect setting.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/LCDS-522
    Modified Paths:
    blazeds/trunk/modules/common/src/flex/messaging/config/ClientConfiguration.java
    blazeds/trunk/modules/common/src/flex/messaging/config/ClientConfigurationParser.java
    blazeds/trunk/modules/common/src/flex/messaging/config/ConfigurationConstants.java
    blazeds/trunk/modules/common/src/flex/messaging/config/ServicesDependencies.java
    blazeds/trunk/modules/common/src/flex/messaging/errors.properties
    Added Paths:
    blazeds/trunk/modules/common/src/flex/messaging/config/FlexClientSettings.java
    Removed Paths:
    blazeds/trunk/modules/core/src/flex/messaging/config/FlexClientSettings.java

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • [svn] 3026: Bugs: LCDS-370 - Passing user credentials from Flex app to WAS 6.1 returns java. lang.ClassCastException

    Revision: 3026
    Author: [email protected]
    Date: 2008-08-28 11:35:50 -0700 (Thu, 28 Aug 2008)
    Log Message:
    Bugs: LCDS-370 - Passing user credentials from Flex app to WAS 6.1 returns java.lang.ClassCastException
    QA: Yes
    Doc: No
    Ticket Links:
    http://bugs.adobe.com/jira/browse/LCDS-370
    Modified Paths:
    blazeds/branches/3.0.x/modules/opt/src/websphere/flex/messaging/security/WebSphereLoginCo mmand.java

    Please test with the new Java Plug-In available in 6u10 at http://jdk6.dev.java.net/6u10ea.html. The Java/JavaScript bridge has been completely rewritten and is now more complete and portable than ever before. Longstanding issues should be fixed with this new version. Please try it and post if you continue to have problems.

  • Concurrent modification exception. What is causing this?

    Here is my the pasrt of code causing the exception I have put a line comment ti indicate the line where it occurs. In addition I would like to know the cause of this eception as its a first for me.
    Here is the full exception ....
    Exception in thread "AWT-EventQueue-0" java.util.ConcurrentModificationException
            at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:3
    72)
            at java.util.AbstractList$Itr.next(AbstractList.java:343)
            at Contact.modifyExisting(Contact.java:432)
            at Phonebook1.actionPerformed(Phonebook1.java:236)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19
    95)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
    a:2318)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:387)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242
            at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
            at javax.swing.plaf.basic.BasicRootPaneUI$Actions.actionPerformed(BasicR
    ootPaneUI.java:191)
            at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636)
            at javax.swing.JComponent.processKeyBinding(JComponent.java:2849)
            at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:267)
            at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:2
    16)
            at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.
    java:2926)
            at javax.swing.JComponent.processKeyBindings(JComponent.java:2918)
            at javax.swing.JComponent.processKeyEvent(JComponent.java:2812)
            at java.awt.Component.processEvent(Component.java:5815)
            at java.awt.Container.processEvent(Container.java:2058)
            at java.awt.Component.dispatchEventImpl(Component.java:4410)
            at java.awt.Container.dispatchEventImpl(Container.java:2116)
            at java.awt.Component.dispatchEvent(Component.java:4240)
            at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.ja
    va:1848)
            at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboard
    FocusManager.java:697)
            at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeybo
    ardFocusManager.java:962)
            at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeybo
    ardFocusManager.java:834)
            at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFoc
    usManager.java:661)
            at java.awt.Component.dispatchEventImpl(Component.java:4282)
            at java.awt.Container.dispatchEventImpl(Container.java:2116)
            at java.awt.Window.dispatchEventImpl(Window.java:2429)
            at java.awt.Component.dispatchEvent(Component.java:4240)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
    ad.java:273)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
    java:183)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:173)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)and the code.......
    if(modifiedWork.length()>0)
                             try
                                  modifiedWorkNum = Integer.parseInt(modifiedWork);
                             } //////// THIS IS LINE 372
                             catch(Exception e)
                                  JOptionPane.showMessageDialog(null,"You may only enter numbers for a valid phone number to try again press the modify nutton again.","Error",JOptionPane.ERROR_MESSAGE);
                                  validModify = false;
                                  return;
                        }Thanks in advance...

    Would you mind looking at my modifyExisting method I apologise as it is long. I have icluded a line comment on line 432.
    public void modifyExisting()
         {// Start of modifyExisting()
              int count = 0;
              int count1 = 0;
              int count2 = 0;
              int modifiedCellNum, modifiedWorkNum, modifiedHomeNum = 0;
              boolean validModify = true;
              boolean found = false;
              String currentHome = "";
              String currentWork = "";
              String currentCell = "";
              if(phoneList.size() > 0)
                   String nameOfContactToEdit = JOptionPane.showInputDialog(null,"Please enter the name of the contact you wish to edit details for or press cancel to exit");
                   if(nameOfContactToEdit == null)
                        finish();
                   if(nameOfContactToEdit.trim().length()<= 0)
                        JOptionPane.showMessageDialog(null,"You have entered an invalid name. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
                        modifyExisting();
                        validModify = false;
                        return;
                   String surnameOfContactToEdit = JOptionPane.showInputDialog(null,"Please enter the the surname for "+nameOfContactToEdit+" if one exists or press cancel to exit.");
                   if(surnameOfContactToEdit == null)
                        finish();
                   for(Person m: phoneList)
                        m = phoneList.get(count);
                        if((m.name).equals(nameOfContactToEdit.trim().toUpperCase())&&(m.surname).equals(surnameOfContactToEdit.trim().toUpperCase()))
                             currentHome = m.home;
                             currentWork = m.work;
                             currentCell = m.cell;
                             found = true;
                        count ++;
                   if(found == true)
                        String modifiedName = JOptionPane.showInputDialog("Please enter the new name for contact or press cancel to keep it as "+nameOfContactToEdit+".");
                        if(modifiedName == null)
                             modifiedName = nameOfContactToEdit;
                        if(modifiedName.trim().length()<= 0)
                             JOptionPane.showMessageDialog(null,"You have entered an invalid name. Please press the modify button to try again.","Error",JOptionPane.ERROR_MESSAGE);
                             return;
                        if(modifiedName.trim().length()>10)
                             JOptionPane.showMessageDialog(null,"You may not enter a new name longer than 10 characters long. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
                             validModify = false;
                             modifyExisting();
                             return;
                        String modifiedSurname = JOptionPane.showInputDialog("Please enter the new surname for contact or press cancel to keep it as "+surnameOfContactToEdit+".");
                        if(modifiedSurname == null)
                             modifiedSurname = surnameOfContactToEdit;
                        if(modifiedSurname.trim().length()>10)
                             JOptionPane.showMessageDialog(null,"You may not enter a surname longer than 10 characters long. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
                             validModify = false;
                             modifyExisting();
                             return;
                        String modifiedHome = JOptionPane.showInputDialog("Please enter a new home number for "+modifiedName+" or press cancel to keep it as is.");
                        if(modifiedHome == null)
                             modifiedHome = currentHome;
                        if(modifiedHome.length()>0)
                             try
                                  modifiedHomeNum = Integer.parseInt(modifiedHome);
                             catch(Exception e)
                                  JOptionPane.showMessageDialog(null,"You may only enter numbers for a valid phone number to try again press the modify nutton again.","Error",JOptionPane.ERROR_MESSAGE);
                                  validModify = false;
                                  return;
                        if(modifiedHome.length() > 10)
                             JOptionPane.showMessageDialog(null,"You may not enter a number longer than 10 characters long. Please press the modify button to try again.","Error",JOptionPane.ERROR_MESSAGE);
                             validModify = false;
                             return;
                        String modifiedWork = JOptionPane.showInputDialog("Please enter a new home number for "+modifiedName+" or press cancel to keep it as is.");
                        if(modifiedHome == null)
                             modifiedWork = currentWork;
                        if(modifiedWork.length()>0)
                             try
                                  modifiedWorkNum = Integer.parseInt(modifiedWork);
                             catch(Exception e)
                                  JOptionPane.showMessageDialog(null,"You may only enter numbers for a valid phone number to try again press the modify nutton again.","Error",JOptionPane.ERROR_MESSAGE);
                                  validModify = false;
                                  return;
                        if(modifiedWork.length() > 10)
                             JOptionPane.showMessageDialog(null,"You may not enter a number longer than 10 characters long. Please press the modify button to try again.","Error",JOptionPane.ERROR_MESSAGE);
                             validModify = false;
                             return;
                        String modifiedCell = JOptionPane.showInputDialog("Please enter a new home number for "+modifiedName+" or press cancel to keep it as is.");
                        if(modifiedCell == null)
                             modifiedCell = currentCell;
                        if(modifiedCell.length()>0)
                             try
                                  modifiedCellNum = Integer.parseInt(modifiedCell);
                             catch(Exception e)
                                  JOptionPane.showMessageDialog(null,"You may only enter numbers for a valid phone number to try again press the modify nutton again.","Error",JOptionPane.ERROR_MESSAGE);
                                  validModify = false;
                                  return;
                        if(modifiedCell.length() > 10)
                             JOptionPane.showMessageDialog(null,"You may not enter a number longer than 10 characters long. Please press the modify button to try again.","Error",JOptionPane.ERROR_MESSAGE);
                             validModify = false;
                             return;
                        if((modifiedHome.length() <= 0) && (modifiedWork.length() <= 0) && (modifiedCell.length() <= 0))
                             JOptionPane.showMessageDialog(null,"The contact must have at least one number to be included in the phonebook. Please press modify button to try again.","Error",JOptionPane.ERROR_MESSAGE);
                             validModify = false;
                             return;
                        for(Person z: phoneList)
                             z = phoneList.get(count1);
                             if((z.name).equals(modifiedName.trim().toUpperCase()) && (z.surname).equals(modifiedSurname.trim().toUpperCase()))
                                  JOptionPane.showMessageDialog(null,"You may not enter duplicate contacts. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
                                  validModify = false;
                                  modifyExisting();
                                  return;
                             count1 ++;
                        if(validModify == true)
                             for(Person contactToMod: phoneList)/////////////////////////////////////////////////////// line 432
                                  contactToMod = phoneList.get(count2);
                                  if((contactToMod.name.equals(nameOfContactToEdit.trim().toUpperCase())) && (contactToMod.surname.equals(surnameOfContactToEdit.trim().toUpperCase())))
                                       try
                                            contactToMod.setName(modifiedName.trim().toUpperCase());
                                            contactToMod.setSurname(modifiedSurname.trim().toUpperCase());
                                            contactToMod.setHome(modifiedHome);
                                            contactToMod.setWork(modifiedWork);
                                            contactToMod.setCell(modifiedCell);
                                            phoneList.add(contactToMod);
                                            JOptionPane.showMessageDialog(null,"Updated contact succesfully.","Information",JOptionPane.INFORMATION_MESSAGE);
                                       catch(Exception e)
                                            JOptionPane.showMessageDialog(null,"The contact was not updated. If probelm persists please contact system administrator.","Error",JOptionPane.ERROR_MESSAGE);
                                  count2 ++;
                   else
                        JOptionPane.showMessageDialog(null,"No contact with that name and surname exists. Please press the modify button to try again.","Error",JOptionPane.ERROR_MESSAGE);
              else
                   JOptionPane.showMessageDialog(null,"The phone list is empty and there are no contacts to modify.","Information Message",JOptionPane.INFORMATION_MESSAGE);
         }// End of modifyExisting()Edited by: Yucca on May 6, 2008 8:12 PM

  • Concurrent Modification Exception

    im running 2 "for" loops on a TreeMap's keySet. But everytime I remove a mapping from the inner loop using iterators I get the CMException. Is there a way to remove a mapping in the inner loop without getting the Exception?

    Try Using two references to the same iterator. At the moment, it sounds like you are getting an iterator twice, once for each loop.

  • List Concurrent Modification Exception

    The following codes throws the java.util.ConcurrentModificationException
    public static void main(String[] args) {
            List<Integer> list1 = new LinkedList<Integer>();
            ListIterator head = list1.listIterator();
            list1.add(1);
            while(head.hasNext()) {
                System.out.println(head.next());
        }But if I put list1.add(1) before
       ListIterator head = list1.listIterator();, then it runs fine.
    I've googled the exception and get the idea that it is caused by 2 threads accessing the list. Where are the 2 threads?
    Edited by: pinkyDeveloper on Feb 17, 2009 3:00 PM

    nothing to do with threads and everything to do with changing the list after getting the iterator and then iterating with the iterator. Don't do this unless you change the list through the iterator. You might want to read the API on LinkedList which states:
    The iterators returned by this class's iterator and listIterator methods are fail-fast: if the list is structurally modified at any time after the iterator is created, in any way except through the iterator's own remove or add methods, the iterator will throw a ConcurrentModificationException.
    Edited by: Encephalopathic on Feb 17, 2009 3:13 PM

Maybe you are looking for

  • "more info" in Get Info showing "--" instead of actual infos for newer videos and images

    I've just noticed that when I click on "Get Info" on my newer pictures and videos, the "more info" section is now showing "--" instead of the dimensions of the images and videos. However when I go to my older files, the info is showing. Also if I sea

  • What is an MDD worth these days?

    I'm considering an upgrade, but don't know if it's worth trying to sell my MDD 1.25. I took a quick look on ebay and I see one posted for 450 in a buy it now. Anyone sell or buy one recently? I think I'd be packaging it with the MOTU 2408 audio recor

  • Inprocess inspection lot

    Hai gurus, I had created a first operation as in process inspection for a halb material,where i had given control key as QM01 and assigned MIC and and sampling procedure in routing, when i release the production order inspection lot is not created, p

  • File/directory info behaviour

    Hi, I'm having an issue with the file/directory info VI (and more file I/O VI's) in labview 7.1.1. They produce a popup error message by themselves which I need to suppress for my own error handling. Any solution for this ? Regards, Marcel Janssen

  • "Other" is taking up all my memory

    Every mac that I go on, doesnt have as much "Other" used up on the computer as my MacBook Pro, Im not sure why, but it keeps building up and takes all of my memory. Here is a picture of it: http://puu.sh/1RuBr PLEASE HELP ME! I have tryed OmniDiskswe