[英]The type java.lang.charSequence cannot be resolved to a type error
I have this following aspectJ class method which gives me the error,The type java.lang.charSequence cannot be resolved to a type error. 我有以下以下aspectJ类方法,该方法给我错误,类型java.lang.charSequence无法解析为类型错误。
before(String name) throws ServiceLayerException:
call(void ServiceImplementation.displayBookDetails(String)) && args(name){
String sqlText = "SELECT * FROM Books WHERE Name='"+name+"'";
logger1.info("Before Aspect :: Display Book Details of " + name);
System.out.println(sqlText);
connectToDbAndDisplayBookDetails(sqlText);
}
I am using Eclipse Kepler and my this project is built using jdk 1.7. 我正在使用Eclipse Kepler,而我的这个项目是使用jdk 1.7构建的。 I tried installing jdk 1.8 patch for Kepler but that doesn't help.
我尝试为开普勒安装jdk 1.8补丁,但这无济于事。 It doesn't get installed and stops during the installation process.
它不会安装并在安装过程中停止。 Please help.
请帮忙。
It can be a sneaky Java8 interface problem. 它可能是一个偷偷摸摸的Java8接口问题。 In Java8 the charSequence has a default method attached.
在Java8中,charSequence具有附加的默认方法。
If you are using it from Java7 compiler doesn't allow you to use default methods. 如果从Java7编译器使用它,则不允许使用默认方法。
Try to fix the jdk 1.8 patch setup. 尝试修复jdk 1.8修补程序设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.