View Javadoc
1   package com.github.sevntu.checkstyle.checks.coding;
2   import java.io.ObjectInputStream;
3   import java.io.ObjectOutputStream;
4   import java.io.Serializable;
5   public class InputAvoidDefaultSerializableInInnerClasses1 implements Serializable
6   {
7   	private int field1;
8   	private String field2 = new String();
9   
10  	InputAvoidDefaultSerializableInInnerClasses1(int a, int b, String s)
11  	{
12  		this.field1 = a;
13  		this.field2 = s;
14  		final class test1 implements Serializable
15  		{
16  			private void readObject(ObjectInputStream s)
17  			{
18  
19  			}
20  
21  			private void writeObject(ObjectOutputStream s)
22  			{
23  
24  			}
25  		}
26  	}
27  
28  	private class justEmpty
29  	{
30  
31  	}
32  
33  	private class Error1 extends justEmpty implements Serializable // error1
34  	{
35  	}
36  
37  	private class NotError1 implements Runnable
38  	{
39  		
40  		public void run()
41  		{
42  		}
43  	}
44  
45  	private class Error2x implements Serializable	// no error for partial allow
46  	{
47  		private void readObject(ObjectInputStream s)
48  		{
49  		}
50  	}
51  
52  	private class Error3x implements Serializable	// no error for partial allow
53  	{
54  		private void writeObject(ObjectOutputStream s)
55  		{
56  		}
57  	}
58  
59  	private class Error2 implements Serializable // error2
60  	{
61  		void readObject(ObjectInputStream s, int a)
62  		{
63  		}
64  	}
65  
66  	private class Error3 
67  	implements Serializable // error3
68  	{
69  		void writeObject()
70  		{
71  		}
72  	}
73  
74  	private class Error4 implements Serializable // error4
75  	{
76  
77  		void readObject()
78  		{
79  		}
80  
81  		class OLOL
82  		{
83  
84  		}
85  
86  		void writeObject()
87  		{
88  		}
89  	}
90  
91  	private class ErrorContainer1
92  	{
93  		private void method()
94  		{
95  		}
96  
97  		class Error5 implements Serializable // error5
98  		{
99  		}
100 	}
101 
102 	private class ErrorContainer2
103 	{
104 		private class BI implements Serializable // error6
105 		{
106 
107 			void readObject()
108 			{
109 			}
110 		}
111 
112 		private void method()
113 		{
114 		}
115 	}
116 
117 	public interface EmptyInterface
118 	{
119 	}
120 
121 	private class Error7 implements EmptyInterface, Serializable, Runnable // error7
122 	{
123 
124 		
125 		public void run()
126 		{
127 		}
128 
129 		void readObject()
130 		{
131 		}
132 	}
133 
134 	private class Error8 implements Runnable, Serializable // error8
135 	{
136 
137 		
138 		public void run()
139 		{
140 		}
141 	}
142 
143 	private void method()
144 	{
145 		final class Error9 implements Serializable // error9
146 		{
147 		}
148 		;
149 	}
150 
151 	static class NoError implements Serializable // Noerror
152 	{
153 
154 		public void readObject(ObjectInputStream s)
155 		{
156 
157 		}
158 	}
159 	private class NoErrorForPartlial1 implements Serializable
160 	{
161 		private void readObject(ObjectInputStream s)
162 		{
163 
164 		}
165 		public int writeObject(ObjectOutputStream s)
166 		{
167 			return field1;
168 		    
169 		}
170 	}
171 	private class ErrorForPartlial implements Serializable //error
172 	{
173 		private final int readObject(ObjectInputStream s)
174 		{
175 			return field1;
176 
177 		}
178 	}
179 	private class NoErrorForPartial3 implements Serializable
180 	{
181 		private void writeObject(ObjectOutputStream s)
182 		{
183 
184 		}
185 	}
186 
187 	final class TwoParameters implements Serializable
188 	{
189 		private void writeObject(ObjectOutputStream s, long l)
190 		{
191 
192 		}
193 	}
194 }