aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/CtNewClass.java
diff options
context:
space:
mode:
authornickl- <github@jigsoft.co.za>2017-10-30 20:37:23 +0200
committernickl- <github@jigsoft.co.za>2017-10-30 20:37:23 +0200
commit62851d0af30cdb0c54046627585451a468aacd2a (patch)
treefd7632ac39246a9598cb5bf6176c4bf0bcb21744 /src/main/javassist/CtNewClass.java
parent45b4c55361eef93542db8014e3ef8941169c97bd (diff)
downloadjavassist-62851d0af30cdb0c54046627585451a468aacd2a.tar.gz
javassist-62851d0af30cdb0c54046627585451a468aacd2a.zip
Source walk/Spring clean/Parameterize/Enhance et.al.
The following were applied during multiple itterations through the source. * Parameterize raw types. * Mark unused members. * Annotate override and deprecated methods. * Convert loops to enhance for loop. * Remove redundant else statements. * Widening collection type references. * Optimize code for improved readability. * Squash compiler warnings. * Identify smells.
Diffstat (limited to 'src/main/javassist/CtNewClass.java')
-rw-r--r--src/main/javassist/CtNewClass.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/javassist/CtNewClass.java b/src/main/javassist/CtNewClass.java
index c809522b..bd5c4b37 100644
--- a/src/main/javassist/CtNewClass.java
+++ b/src/main/javassist/CtNewClass.java
@@ -43,6 +43,7 @@ class CtNewClass extends CtClassType {
hasConstructor = isInterface;
}
+ @Override
protected void extendToString(StringBuffer buffer) {
if (hasConstructor)
buffer.append("hasConstructor ");
@@ -50,6 +51,7 @@ class CtNewClass extends CtClassType {
super.extendToString(buffer);
}
+ @Override
public void addConstructor(CtConstructor c)
throws CannotCompileException
{
@@ -57,6 +59,7 @@ class CtNewClass extends CtClassType {
super.addConstructor(c);
}
+ @Override
public void toBytecode(DataOutputStream out)
throws CannotCompileException, IOException
{
@@ -117,8 +120,7 @@ class CtNewClass extends CtClassType {
String pname2 = superclazz.getPackageName();
if (pname == null)
return pname2 == null;
- else
- return pname.equals(pname2);
+ return pname.equals(pname2);
}
return true;