ConverterCollection.contains () does not respect the contract

Hello

I am using an aggregator to see if the result of an aggregation is not empty. You can see the code below. In the aggregateResults(Collection results), the returned result is a ConverterCollection.

When I call
results.contains( Boolean.TRUE )
This returns false. However when I change it by using the following:
               for (Object object : results)
               {
                    if (object.equals(Boolean.TRUE))
                    {
                         return true;
                    }
               }
               return false;
This returns true. This should not give me the same thing?

Here's the complete code aggregator.
     public static final class IsNotEmpty implements ParallelAwareAggregator, ExternalizableLite {

          private static final long serialVersionUID = 1L;
          public static final IsNotEmpty INSTANCE = new IsNotEmpty();

          @SuppressWarnings("unchecked")
          public Object aggregateResults(Collection results) {
               if (results.isEmpty()) {
                    return Boolean.FALSE;
               }

               return contains(results) ? Boolean.TRUE : Boolean.FALSE;
          }

          private boolean contains(Collection results)
          {
               for (Object object : results)
               {
                    if (object.equals(Boolean.TRUE))
                    {
                         return true;
                    }
               }
               return false;
               //             return results.contains( Boolean.TRUE );   --> this would return false even if there's a Boolean.TRUE in the collection
          }

          public EntryAggregator getParallelAggregator() {
               return this;
          }

          @SuppressWarnings("unchecked")
          public Object aggregate(Set candidates) {
               return candidates.isEmpty() ? null : Boolean.TRUE;
          }


          public void readExternal(DataInput input) throws IOException {

          }

          public void writeExternal(DataOutput output) throws IOException {

          }
     }
I use coherence 3.4.2.

Best regards
Jan

Hi Jan-

The contains() method is implemented, but it delegate to the underlying collection. It uses the "down converter" to the value that you provide and it becomes the format used by the underlying connection:

public boolean contains(Object o)
    {
    return getCollection().contains(getConverterDown().convert(o));
    }

Unfortunately, no one expected the "step-down" deemed necessary; that is, it expected that binaries need to be converted to objects but not vice versa. If you check the return value of getConverterDown() of this ConverterCollection, you will find that it is a converter "null." This was noted as COH-2723, and will be fixed in the next version. your workaround solution is appropriate for now.

Peace,

Cameron Purdy | The Oracle coherence
http://coherence.Oracle.com/

Tags: Fusion Middleware

Similar Questions

  • 15.1 TMS does not respect the preferred routing protocol

    TMS 15.1

    C series: TC7.2.1, TC7.3.4

    SX20 and 80: TC7.3.4 and EC8.01

    All the saved settings to VCS with addresses both H.323 and SIP.

    Conference TMS-settings of parameters / advanced: shares of routing protocol: H.323

    By default the Protocol of appeal located on all the evaluation criteria: H.323

    When creating new conferences, connection parameter is defined as "SIP" despite the preference above, this to H.323 does not change the connection string to [email protected] / * / the alias preferred without any suffix.

    I do not see anything either in the TMS open and resolved the issues list, then, until I opened a case with TAC, has anyone already opened a file, or found a way to solve this problem? (Couldn't see this issue in TMS 14.4.x)

    Thank you/Bravo

    /Jens

    Hi Jens,

    I can't reproduce your problem here.  I have two end points recorded on my VCSes, and when their scheduling in TMS 15.1.0 it is showing that H.323 in connection settings.

    If I click on "Settings" under the Action on the far right of the display of connection settings in MSD, I can change it to "IP - SIP" and used addresses change to SIP, and if I change it back to "IP - H.323", it changes again in the H.323 addresses.

    Wayne

  • APX1099 process does not respect the "output Destination.

    Hi friends!

    I have run the APX1099 process to print COPY B 1099 files and I'll put the 'output destination' until I run it:

    P.S. I have administrative privileges for this directory.

    4-8-2015 11-08-12 AM.png

    But the files are generated in a different directory and I can not find where this directory has been created (\appserv\prcs\psdev\files\XMLP). The process does not have the 'output destination' that I put forward.

    Does anyone have an idea what could be causing this problem?

    P.S. The output location in report definition routine is defined as "all":

    4-8-2015 11-37-27 AM.png

    Thank you very much for your help!

    Kind regards

    Tarsio Alvares

    Tarsio Alvares based on code, I see in the App Engine, writing of file is not managed.

    You can see that OutDestType = 6 (Web) and % OutDestType = 3 (printer) are dealt with. Technically, should also have some code for % OutDestType = 2 (file) to cover for the file option.

    You will need to write the following code to operate temporarily. Moreover, wear it like a SR with Oracle that this appears to be a delivered report and should be able to print to file.

    If OutDestType = 2 Then %

    & REPORT_DEFN. OutDestination = FilePath %;

    End - If;

    As follows:

    Let us know if that helps. Once I added this code, it seems to work very well when I'm printing to a file. Thank you!

  • Automatic after update 6.5 does not respect the ID_FLUX

    Hello!

    Once the update to 6.5 automatic does not seem to respect the parameters of ID_FLUX. At least for recently added items, only it looks overall of all foods, no juice in the ID_FLUX defined in the config file

    Strange, I deleted the new show elements and add them manually (previously it was copy-and - paste to Evernote) and doesn't work very well.

    I have a suspicion some characters have been copied with codes utf frong and unrecognized by the application correctly.

  • OS 6.0 - paint background does not respect the global alpha

    Hi all

    I debugged the following code (this is a complete application that brings together up to 4.7 and up - and we can go back on required versions by substituting Graphics.create (Bitmap) (deprecated in 4.7 and later) new Graphics (Bitmap)) and found that there is a regression in OS 6.0 on real torch and the Simulator.  Previous models of phone everything works perfectly (I've tested of 8830 with 4.2.1 up to 9700 and Storm2 5.0).

    In short, if I use graphics.setGlobalAlpha () and then graphics.setColor () and graphics.fillRect (), the transparency is honored. If, after the setGlobalAlpha(), I use graphics.setBackgroundColor () and clear, the result is completely opaque.  The code below demonstrates the problem.  It requires no signature and is small enough to quickly deploy on the phone without having to reboot - try it on simulators and different phones and compare:

    import net.rim.device.api.system.Bitmap;
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    
    public class TestOpacity extends UiApplication {
    
        /**
         * @param args
         */
        public static void main(String[] args) {
            new TestOpacity().enterEventDispatcher();
        }
    
        public TestOpacity() {
            MainScreen scr = new MainScreen();
            final Bitmap background = new Bitmap(200,200);
            Graphics drawToBG = Graphics.create(background);
            Font font = Font.getDefault().derive(Font.PLAIN, 24);
            int fontHeight = font.getHeight();
            drawToBG.setFont(font);
            drawToBG.drawText("Sample 1", 2, 2);
            drawToBG.drawText("Sample 2", 2, fontHeight + 2);
            drawToBG.drawLine(2, 100, 197, 100);
            drawToBG.drawText("Sample 3", 2, 200 - 2 * fontHeight - 4);
            drawToBG.drawText("Sample 4", 2, 200 - fontHeight - 2);
            VerticalFieldManager vfm = new VerticalFieldManager() {
                protected void paintBackground(Graphics g) {
                    g.drawBitmap(0, 0, background.getWidth(), background.getHeight(), background, 0, 0);
                }
    
                protected void sublayout(int w, int h) {
                    w = Math.min(background.getWidth(), w);
                    h = Math.min(background.getHeight(), h);
                    super.sublayout(w, h);
                    setExtent(w, h);
                }
            };
    
            Field fld1 = new Field()    {
                protected void layout(int w, int h) {
                    setExtent(w, h/2);
                }
    
                protected void paint(Graphics g) {
                    int opacity = g.getGlobalAlpha();
                    g.setGlobalAlpha(150);
                    int color = g.getBackgroundColor();
                    g.setBackgroundColor(Color.BLACK);
                    g.clear();
                    g.setBackgroundColor(color);
                    g.setGlobalAlpha(opacity);
                }
            };
    
            Field fld2 = new Field()    {
                protected void layout(int w, int h) {
                    setExtent(w, h);
                }
    
                protected void paint(Graphics g) {
                    int opacity = g.getGlobalAlpha();
                    g.setGlobalAlpha(150);
                    int color = g.getColor();
                    g.setColor(Color.BLACK);
                    g.fillRect(0,0,getWidth(), getHeight());
                    g.setColor(color);
                    g.setGlobalAlpha(opacity);
                }
            };
    
            vfm.add(fld1);
            vfm.add(fld2);
            scr.add(vfm);
            pushScreen(scr);
        }
    
    }
    

    It comes from our friends on the EDGE of debug and difficulty both for other BlackBerry programmers have a work around...

    Please report it in the BlackBerry Issue Tracker: https://www.blackberry.com/jira/secure/Dashboard.jspa

  • Adobe Acrobat DC does not respect the parameters of the "first sight".

    I often have to exit from InDesign for proofing to the initial view of two to the top of the cover page. It's so customers can see brochures and so forth as they would print. It worked fine pre Acrobat DC.

    Acrobat DC no longer seems to respect this setting 'initial view' - I have to switch to mode > Page Display.

    This is minor, but it is extremely irritating.

    Any help appreciated.

    Ruth

    Check the accessibility preferences.

  • Graphic cursor size does not respect the Bode plot

    Hello

    I was wondering if someone would be able to shed some light on a problem I'm having about a graph XY cursor.

    I developed a simple VI to determine the characteristics of a low-pass filter through which a sinusoidal signal ramp frequency and subsequently followed the gain of the filter to create a Bode plot.

    Through the analysis of the curve of Bode I want to determine the cutoff frequency of depression go the filter under test. I introduced a slider in the chart and using a property node I have hoped to set the cursor to-3dB point in the Y axis and the corresponding sliders X post thus determining the cutoff frequency of the output filter.

    However the slider seems never to follow the plot beyond the first stage of the loop. It feels as if there is a break in the conspiracy between the 1st and 2nd iteration of the while loop used for the ramp signal generator.

    I tried to find why the cursor won't follow the plot at-3dB, but so far I am confused.

    Any help or advice you could provide would be greatly appreciated! I have provided the attached VI for clarity.

    I corrected your VI.

    First of all, you need to put the property node AFTER the while loop, because you need the chart to be done first and then watch the cut off frequency.

    Secondly, in LV, property nodes are read from top down. So you have to move the cursor to Y =-3 first, and then read the X position.

    I have attached the corrected vi

  • Fusion does not respect the comments (Windows) connection settings

    Hello.

    I have Windows XP as the operating system invited to merger (2.0.5). Although I have implemented several users in Windows, protected by password, Fusion will automatically start as administrator.

    Is it possible to force the merger to the windows login parameters so that the user must choose the corresponding user profile and enter the password?

    Thanks in advance.

    Download and run the Disable_AutoAdminLogon.reg file and it will automatically disable you connect as an administrator when you restart the system.

  • CF 9.0.1 Solr does not have the Java virtual machine path

    As part of the security of some of our machines for use of DoD, need to maintain the versions of Java.  To do this, we install the latest JDK and use the server settings > Java and JVM > Machine way Java virtual to then tell CF to use it.  We have done this since CF4 without any problems and when we moved to CF6 + we continued the process, but also after having what we then delete the folder of jre in runtime folder leave the CF is. Well I have just the program installation and installed my first CF9 + Win 2008 R2 server and after doing this the Solr service does not start.  This had me so dig in its folder structure and it has its own folder of the jre in its folder structure as well.  But using Sysinternals Process Monitor, I can see the service Solr uses NOT the folder of the jre from the inside it of own structure but is actually going up and 'try' to use the runtime\jre folder that I have deleted so it causes the service to fail.  I can actually delete the solr\jre folder as long as the runtime\jre folder exist.

    There are so many problems with this.

    • SOLR has yet another installation of Java within itself
    • SOLR does not use its own Java, even if there is a copy it
    • SOLR does not respect the setting Java VM path together

    Adobe has responded to my bug with the location of the solr configuration variable to point to the external JAVA virtual machine.

    ColdFusion9\solr\solr.lax

    Lax.nl.currentvm = JVM_PATH

    It seems to work properly until now.

  • Windows 2008 Server: unable to update the password. the value provided for the new password does not respect length, complexity, or history of the field requirements

    Unable to update the password. the value provided for the new password does not respect length, complexity, or history of the field requirements

    Hello

    I suggest you to send your request in this forum for better support.
  • HP Pavilion 500 - C60: HP Pavilion 500 - C60 does not recognize the container pictures xD

    My PC has a slot with an image suggesting an SD card (showing the cut upper right corner). However, the number of internal contacts seems to be two times more than necessary by an SD card. Result: no SD card fits into the slot, but a XD card seems to have the exact number of the required connectors by an XD card. And indeed the xD fits perfectly into the slot.

    So far so good.

    Problem is that the Windows 8.1 does not recognize the card. I searched using Google but couldn't find a solution.

    Can anyone help?

    I ended up buying a Vivitar 5 in 1 card reader that plugs into a USB 2.0 and works fine all bypassing the hp pavilion integrated card reader. This allows me to read my old card xD, but there is a work-around, not a real solution. I rest my case.

  • Why my master password does not meet the correct password, in that I get

    After you set up a master password in security settings constantly, he asked for it, but when I get in there it does not recognize the password. I wrote it down in order to avoid this problem. I don't know that it is the only one I chose. try again again and again did not help.
    Please help me. What do you think is the best way to solve this problem?

    Hello

    Refresh (called "Reset" in older versions of Firefox) can solve a lot of problems in restaurant Firefox as his default factory while saving your bookmarks, history, passwords, cookies, and other essential information.

    Note: When you use this feature, you will lose all the extensions, toolbar customizations, and certain preferences. See article Firefox Refresh - reset modules and parameters for more information.

    Refresh for Firefox:

    1. Open the troubleshooting information page using one of the following methods:

      • Click the menu button

        click Help

        and select troubleshooting information. Should open a new tab containing your troubleshooting information.

      • If you are unable to access the Help menu, type Subject: support in your address bar to bring up the troubleshooting information page.
    2. At the top right of the page, you should see a button that says 'Refresh Firefox' ('reset Firefox' in older versions of Firefox). Click on it.
    3. Firefox closes. Once the update process is complete, Firefox will display a window with the imported information.
    4. Click Finish and reopen Firefox.

    This corrects the problem? Please report to us!

    Thank you.

  • Firefox does not load the password files

    Firefox uses two files to load and store passwords:
    signons3.txt and sign. Lite
    The two files are present in the profile and both are filled with relevant information of password. However, the password manager, which is located under Options, remains empty. When I opened the Web pages that require passwords, and which I know for sure that they are in the files of passwords, firefox does not work shall complete them boxes apprioriate. Logical, as the passwords are not loaded in password manager

    Additional information:
    When I now save a password for a Web page, it does not store the information and fills the boxes on the Web page.
    [This problem occurred when setting back the old profile [copy - paste] in the right folder I found through cards help-resolution of problems-show]

    No I have not thought about it.
    Make a copy of the entire profile.
    copy the old information in the newly created profile

    Took an old signons3.txt from backup
    Has taken the last signon.lite that contains all of these passwords
    Both of these placed files [Replace] in the new profiel

    and voila. Everything is back

  • I can't download to work - it does not copy the mp3 files to my location (as defined in tools/options) - it gives me a new window with a player - no dwnlo

    I am running windows xp sp2 and I put my site to dowload under (Tools/options), but when I select an MP3 file to download, firefox does NOT copy the file to my location of choice on my HD - instead, it opens a new window with a 'player' of fortune and starts to load the player with the MP3 file. The problem is that I have no idea where on my system, firefox has copied this file, so, I can't leave and come back later and read this MP3 file using winamp. I need to hear right then or lose - if I close this new window (with this puny little ' player'), then I lose the download, there where to put firefox on my PC (I have no idea where it is). It's all under firefox 25.0

    I also use FIrefox 12.0 on an older windows 2000 machine and that works perfectly - I can download any MP3 file, I want to, and downloads of firefox 12.0 (on win2k, sp4) to my location (on my HD), and it gives me the download window so I can watch its progress and have some control over break and resume , and, when it's done, the download window offers me the option 'open containing folder' so I can make sure that where I wanted. In other words, Firefox 12.0 on WIn2k, sp4 works better than firefox on winxp sp2 25.0! What gives? I went through and set up my options for XP just like I did with Win2k and everything looks good, but firefox 25.0 don't know just my chosen and always default place to give me fortune player and I am not able to actually copy the mp3 files on my hard drive - it's firerox almost unusable 25.0 since downloading mp3 files is a big part of my use firexfox - please help. I am not able to upgrade windows at this time, and since firefox 12.0 still works fine on win2k, I do not understand what has happened to firefox?

    Hello littleberry, you can click on the link that leads to an mp3 file or right click on the drive in firefox and choose to download the file like that...

  • Windows 8 does not see the hard drive on the Satellite A200

    Windows 8 does not see the hard drive on the A200.
    How to install it?

    S strange Windows 8 should already contain the HARD drive controller driver to recognize the HARD drive during installation.
    The HARD drive is visible in the BIOS?

    Do you use the original disc from Microsoft of Windows 8?

Maybe you are looking for

  • PRODUCT: FOX27ES 4540 s [redacted] ProBook #ABV WITH WINDOWS 8.1 64 BIT BLUE TOOTH DRIVER MISSING

    Hello I'm having Probook 4540 s serial No.: 2CE3490RSG PRODUCT: FOX27ES #ABV WITH WINDOWS 8.1 64 BIT BLUE TOOTH DRIVER NOT INSTALLED PROPERLY I TRIED to INSTALL MEDIATEK SUDDENLY WINDOWS SOFTWARE GET CRASHED... PLEASE HELP ME TO CHOOSE THE RIGHT DRIV

  • How can I reinstall the operating system on the 4200 travel companion

    I received just an old Travel Mate 4200 and you want to clean.  How can I reinstall the operating system?

  • ZBOOK 15 G2

    I installed all the drivers that are on the web but any site to even show a PCI Device in Device Manager.  I don't know what else to try.

  • Unable to save the changes to photo to disk

    original title; Changes to the photo on a CD - R That I imported the photos from my computer to a CD - R.  When I mark the photos after their displacement on the CD, my changes are not saved when I eject the CD, and then when I insert it again.   How

  • Upgrading a x61t

    Hi, I wrote just a stock x61t-7762-H7U for $100 on Ebay. I have a 120 GB SSD and a 500 GB HARD drive, I use, but I'm not sure of that because I believe the x 61 uses 1.5 Gbps. It's true there is a BIOS ROM flash SATA II? In addition, what we should h