Changeset 1599 for trunk/autoquest-plugin-http/src
- Timestamp:
- 07/11/14 11:58:34 (10 years ago)
- Location:
- trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/HTTPLogParser.java
r1565 r1599 104 104 105 105 try { 106 parseFile(new FileInputStream(file)); 107 } catch (FileNotFoundException e) { 108 Console.printerr("Error parsing file + " + file.getName()); 106 parseFile(new FileInputStream(file)); 107 } 108 catch (FileNotFoundException e) { 109 Console.printerr("Error parsing file + " + file.getName()); 109 110 Console.logException(e); 110 111 return; 111 112 } 112 113 } 113 114 -
trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/commands/CMDparseDirHTTP.java
r1383 r1599 71 71 72 72 Collection<List<Event>> sequences = parser.getSequences(); 73 73 74 74 if (GlobalDataContainer.getInstance().addData(sequencesName, sequences)) { 75 75 CommandHelpers.dataOverwritten(sequencesName); … … 104 104 } 105 105 catch (Exception e) { 106 Console.printerrln("Could not parse " + source + ": " + e .getMessage());106 Console.printerrln("Could not parse " + source + ": " + e); 107 107 } 108 108 } -
trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/HTTPEventType.java
r1561 r1599 136 136 HTTPEventType other = (HTTPEventType) obj; 137 137 138 if (!other.getClass().isAssignableFrom(this.getClass())) { 139 return false; 140 } 141 142 if (exchange == null) { 143 return other.exchange == null; 144 } 145 else if (other.exchange == null) { 146 return false; 147 } 148 138 149 HttpRequest request1 = exchange.getRequest(); 139 150 HttpRequest request2 = other.exchange.getRequest(); 140 151 141 return (HTTPUtils.equals(exchange.getSender(), other.exchange.getSender()) &&142 152 // do not compare the sender, as this may change 153 return (HTTPUtils.equals(exchange.getReceiver(), other.exchange.getReceiver()) && 143 154 HTTPUtils.equals(request1.getMethod(), request2.getMethod()) && 144 155 HTTPUtils.equals(request1.getProtocol(), request2.getProtocol()) && … … 155 166 @Override 156 167 public int hashCode() { 157 return 158 exchange.getRequest().getMethod().hashCode() + 159 exchange.getRequest().getProtocol().hashCode() + 160 exchange.getRequest().getUrl().hashCode(); 168 if (exchange != null) { 169 return 170 exchange.getRequest().getMethod().hashCode() + 171 exchange.getRequest().getProtocol().hashCode() + 172 exchange.getRequest().getUrl().hashCode(); 173 } 174 else { 175 return 0; 176 } 161 177 } 162 178 -
trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/SOAPEventType.java
r1591 r1599 36 36 * @author Patrick Harms 37 37 */ 38 public class SOAPEventType extends HTTPEventType {38 public final class SOAPEventType extends HTTPEventType { 39 39 40 40 /** */ … … 190 190 } 191 191 else if (obj instanceof SOAPEventType) { 192 if (!obj.getClass().isAssignableFrom(this.getClass())) { 193 return false; 194 } 195 192 196 return 193 197 super.equals(obj) && … … 204 208 @Override 205 209 public int hashCode() { 206 return super.hashCode() + calledMethod.hashCode(); 210 if (calledMethod != null) { 211 return super.hashCode() + calledMethod.hashCode(); 212 } 213 else { 214 return super.hashCode(); 215 } 207 216 } 208 217
Note: See TracChangeset
for help on using the changeset viewer.