jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JavaNCSS
  • JAVANCSS-11

Issue parsing generic typing method calls (possibly related to use of the ternary operator?)

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 29.50
  • Fix Version/s: None
  • Labels:
    None

Description

The following block of code:

44: return Boolean.TRUE.equals(adsAvailable)
45: ? super.<AdProviderQuery, List<ProxyAdResult>>processContext(query, context)
46: : Collections.<ProxyAdResult>emptyList();

Results in:

$ mvn org.codehaus.mojo:javancss-maven-plugin::report
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Monetization Ad Provider Ingenio
[INFO] task-segment: [org.codehaus.mojo:javancss-maven-plugin::report]
[INFO] ------------------------------------------------------------------------
[WARNING] Attempting to build MavenProject instance for Artifact (org.codehaus.mojo:javancss-maven-plugin:2.0-beta-3-20080522.073952-1) of type: maven-plugin; constructing POM artifact instead.
[INFO] [javancss:report]
ParseException in C:\build-mp\main\monetization\adprovider_ingenio\src\main\java\com\jumptap\monetization\adprovider\ingenio\framework\IngenioContextService.java
Last useful checkpoint: "com.jumptap.monetization.adprovider.ingenio.framework.IngenioContextService.process(AdProviderQuery)"
Encountered "<" at line 45, column 25.
Was expecting one of:
"assert" ...
<IDENTIFIER> ...

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An error has occurred in JavaNCSS Report report generation.

Embedded error: Error while JavaNCSS was executing
Encountered "<" at line 45, column 25.
Was expecting one of:
"assert" ...
<IDENTIFIER> ...

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    javancss.zip
    09/Jul/09 8:55 AM
    20 kB
    Eric Lewis
    1. Java Source File
      PriorityMigrator.java 4 kB
    2. Java Source File
      WdlFullMigrator.java 5 kB
    3. Java Source File
      TrademarkDetailMigrator.java 11 kB
    4. Java Source File
      ParallelProcessor.java 10 kB
    5. Java Source File
      EngineImpl.java 17 kB
    6. Java Source File
      AbstractGenericIPESVMigrator.java 9 kB
    7. Java Source File
      AbstractMigrator.java 24 kB
    8. Java Source File
      ImageMigrator.java 8 kB
    Download Zip
    Show
    Zip Archive
    javancss.zip
    09/Jul/09 8:55 AM
    20 kB
    Eric Lewis

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Sébastien Reynaud added a comment - 29/May/09 4:47 AM - edited

can you attach a sample code, which compiles but that JavaNCSS fails to parse?

Show
Sébastien Reynaud added a comment - 29/May/09 4:47 AM - edited can you attach a sample code, which compiles but that JavaNCSS fails to parse?
Hide
Permalink
Eric Lewis added a comment - 03/Jun/09 5:08 AM

This bug seems related to generics.

We have the same message:
ParseException in ....AbstractEventBasedESVMigrator.java
Last useful checkpoint: "....AbstractEventBasedESVMigrator.EventBasedSimpleRulech.ipi.migration.impl.migrator.AbstractEventBasedESVMigrator.EventBasedSimpleRule.EventBasedSimpleRule"
Encountered "<" at line 197, column 98.
Was expecting one of:
"assert" ...
"enum" ...
<IDENTIFIER> ...
"[" ...
"..." ...

Starting at line 197 comes the following method:

public <H extends F> EventBasedSimpleRule(final Properties<H, FieldEnum, S, D>.GetterProperty<U> sourceProperty,
final Properties<H, FieldEnum, S, D>.SetterProperty<V> destProperty) throws MigrationInitializationException { super(sourceProperty, destProperty); }

Or another case:
ParseException in ...AbstractMigrator.java
Last useful checkpoint: "...AbstractMigrator.initIdentityRules"
Encountered "<" at line 140, column 64.
Was expecting one of:
"assert" ...
"enum" ...
<IDENTIFIER> ...
"[" ...
"..." ...

Line 139:
private List<? extends Rule<S, D>> initIdentityRules(
final Map<Properties<F, G, S, D>.ReflectiveGetterProperty<? extends Object>, Properties<F, G, S, D>.ReflectiveSetterProperty<? extends Object>> map)
throws MigrationInitializationException {

Show
Eric Lewis added a comment - 03/Jun/09 5:08 AM This bug seems related to generics. We have the same message: ParseException in ....AbstractEventBasedESVMigrator.java Last useful checkpoint: "....AbstractEventBasedESVMigrator.EventBasedSimpleRulech.ipi.migration.impl.migrator.AbstractEventBasedESVMigrator.EventBasedSimpleRule.EventBasedSimpleRule" Encountered "<" at line 197, column 98. Was expecting one of: "assert" ... "enum" ... <IDENTIFIER> ... "[" ... "..." ... Starting at line 197 comes the following method: public <H extends F> EventBasedSimpleRule(final Properties<H, FieldEnum, S, D>.GetterProperty<U> sourceProperty, final Properties<H, FieldEnum, S, D>.SetterProperty<V> destProperty) throws MigrationInitializationException { super(sourceProperty, destProperty); } Or another case: ParseException in ...AbstractMigrator.java Last useful checkpoint: "...AbstractMigrator.initIdentityRules" Encountered "<" at line 140, column 64. Was expecting one of: "assert" ... "enum" ... <IDENTIFIER> ... "[" ... "..." ... Line 139: private List<? extends Rule<S, D>> initIdentityRules( final Map<Properties<F, G, S, D>.ReflectiveGetterProperty<? extends Object>, Properties<F, G, S, D>.ReflectiveSetterProperty<? extends Object>> map) throws MigrationInitializationException {
Hide
Permalink
Herve Boutemy added a comment - 03/Jun/09 3:58 PM

can you attach a sample code, which compiles but that JavaNCSS fails to parse?

Show
Herve Boutemy added a comment - 03/Jun/09 3:58 PM can you attach a sample code, which compiles but that JavaNCSS fails to parse?
Hide
Permalink
Eric Lewis added a comment - 04/Jun/09 2:33 AM

Yes, I did write the corresponding lines in my description. Or do you need the whole source file? I would have to check about that...

Show
Eric Lewis added a comment - 04/Jun/09 2:33 AM Yes, I did write the corresponding lines in my description. Or do you need the whole source file? I would have to check about that...
Hide
Permalink
Sébastien Reynaud added a comment - 04/Jun/09 3:05 AM

It's better if you attach the whole source file.

Show
Sébastien Reynaud added a comment - 04/Jun/09 3:05 AM It's better if you attach the whole source file.
Hide
Permalink
Christoph Stäbler added a comment - 15/Sep/11 1:26 AM

hey
I have the same problem. when I try to compile the following line of code:

this.<SomeDataType> foo( pValue );

I get the same error.

Show
Christoph Stäbler added a comment - 15/Sep/11 1:26 AM hey I have the same problem. when I try to compile the following line of code:
this.<SomeDataType> foo( pValue );
I get the same error.

People

  • Assignee:
    Unassigned
    Reporter:
    James Maki
Vote (1)
Watch (6)

Dates

  • Created:
    19/Jan/09 1:18 PM
    Updated:
    15/Sep/11 1:26 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.