Problem with ClassResolving for RedundantThrowsCheck #50

Closed
romani opened this Issue Nov 10, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@romani
Owner

romani commented Nov 10, 2013

Created: 2010-05-21
Creator: Arek Sokołowski
SF issue: 608

Code:

package a.b.c;

public class MyException { }

Code:

package test;

import a.b.c.MyClass;
import a.b.c.MyException;

/**
 * Doc.
 */
public class Asset {
  public final MyClass m() throws MyException {
    MyClass d = new MyClass("aaa");
    return myClass;
  }
}

Launch:
15:18 ~/Temp $ java -cp file:///home/rivanov/java/git-others/checkstyle/target/checkstyle-5.7-SNAPSHOT-all.jar com.puppycrawl.tools.checkstyle.Main -c file:///home/rivanov/java/git-others/checkstyle/sun_checks.xml MyException.java Asset.java
Starting audit...
/home/rivanov/Temp/MyException.java:0: File does not end with a newline.
/home/rivanov/Temp/MyException.java:0: Missing package-info.java file.
/home/rivanov/Temp/MyException.java:3: Missing a Javadoc comment.
/home/rivanov/Temp/MyException.java:3:27: '{' is not followed by whitespace.
/home/rivanov/Temp/MyException.java:3:27: '}' is not preceded with whitespace.
/home/rivanov/Temp/Asset.java:10:3: Missing a Javadoc comment.
/home/rivanov/Temp/Asset.java:10:35: Unable to get class information for MyException.

Unexpected: "Unable to get class information for MyException." from RedundantThrowsCheck (AbstractTypeAwareCheck, ClassResolver).

Nuance: this works fine in EclipseCS 5.6 - looks like problem/feature of ClassLoader.

@ychulovskyy

This comment has been minimized.

Show comment Hide comment
@ychulovskyy

ychulovskyy Dec 25, 2014

Contributor

@romani Could you please close the issue since RedundantThrows was removed from the project?

Contributor

ychulovskyy commented Dec 25, 2014

@romani Could you please close the issue since RedundantThrows was removed from the project?

@romani romani closed this Dec 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment