Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[bpel-dev] getPrefix()

Hi,

 

I just found a strange piece of code in the org.eclipse.bpel.ui.contentassist.FunctionTemplatesContentAssistProcessor:

 

      . . .

      String getPrefix ( String ns , String preferredPrefix ) {

           

            /**

             * Namespaces must be mapped to a prefix as the template proposal is going

             * to generate a proposal where the prefix is used.

             */

           

            String pfx = BPELUtils.getNamespacePrefix (fModel, ns);               

           

            /** Valid, already mapped prefix */

            if (BPELUtils.isEmptyOrWhitespace(pfx) == false) {

                  return pfx;

            }

     

            /** Not yet mapped */             

            pfx = preferredPrefix;      

            if (BPELUtils.isValidPrefixName(pfx) ) {

                  // problem

                  return null;

            }

           

            return pfx;

 

      }

      . . .

 

I guess if pfx is a valid prefix name then it’s actually not a problem and getPrefix() should not return null, right? J

 

Thanks,

  Oleg.

 

--------------------------------------------------------------------
Closed Joint Stock Company Intel A/O
Registered legal address: 125252, Moscow, Russian Federation, 
Chapayevsky Per, 14.

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

Back to the top