conflict_resolution
stringlengths
27
16k
<<<<<<< public boolean setViewstates(final UUID searchId, String[] viewstates) { if (ArrayUtils.isEmpty(viewstates)) { ======= public boolean setViewstates(Long searchId, String[] viewstates) { if (cgBase.isEmpty(viewstates)) { >>>>>>> public boolean setViewstates(final UUID searchId, String[] viewstates) { if (cgBase.isEmpty(viewstates)) {
<<<<<<< import android.os.Environment; ======= import android.view.ViewConfiguration; import java.lang.reflect.Field; >>>>>>> import android.os.Environment; import android.view.ViewConfiguration;
<<<<<<< ======= import java.util.List; import java.util.Map; >>>>>>> import java.util.List; <<<<<<< info.noteDbEnabled = true; ======= info.messages = getMessages(); info.noteDbEnabled = toBoolean(isNoteDbEnabled()); >>>>>>> info.messages = getMessages(); info.noteDbEnabled = true; <<<<<<< ======= private List<MessageOfTheDayInfo> getMessages() { return this.messages.stream() .filter(motd -> !Strings.isNullOrEmpty(motd.getHtmlMessage())) .map( motd -> { MessageOfTheDayInfo m = new MessageOfTheDayInfo(); m.id = motd.getMessageId(); m.redisplay = motd.getRedisplay(); m.html = motd.getHtmlMessage(); return m; }) .collect(toList()); } private boolean isNoteDbEnabled() { return migration.readChanges(); } >>>>>>> private List<MessageOfTheDayInfo> getMessages() { return this.messages.stream() .filter(motd -> !Strings.isNullOrEmpty(motd.getHtmlMessage())) .map( motd -> { MessageOfTheDayInfo m = new MessageOfTheDayInfo(); m.id = motd.getMessageId(); m.redisplay = motd.getRedisplay(); m.html = motd.getHtmlMessage(); return m; }) .collect(toList()); }
<<<<<<< ======= import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; >>>>>>> import android.content.Context; <<<<<<< import cgeo.geocaching.apps.cache.navi.NavigationAppFactory; ======= import android.widget.ListView; import android.widget.TextView; >>>>>>> import android.widget.ListView; import android.widget.TextView; import cgeo.geocaching.apps.cache.navi.NavigationAppFactory; <<<<<<< ======= } else if (menuItem == 6) { clearHistory(); return true; }else if (menuItem == 20) { base.runExternalMap(cgBase.mapAppLocus, activity, res, warning, tracker, coords.get(0), coords.get(1)); // locus return true; } else if (menuItem == 21) { base.runExternalMap(cgBase.mapAppRmaps, activity, res, warning, tracker, coords.get(0), coords.get(1)); // rmaps return true; } else if (menuItem == 23) { base.runExternalMap(cgBase.mapAppAny, activity, res, warning, tracker, coords.get(0), coords.get(1)); // rmaps return true; >>>>>>> } else if (menuItem == 6) { clearHistory(); return true; <<<<<<< ======= private void radarTo() { List<Double> coords = getDestination(); if (coords == null || coords.get(0) == null || coords.get(1) == null) { warning.showToast(res.getString(R.string.err_location_unknown)); } try { if (cgBase.isIntentAvailable(activity, "com.google.android.radar.SHOW_RADAR") == true) { Intent radarIntent = new Intent("com.google.android.radar.SHOW_RADAR"); radarIntent.putExtra("latitude", new Float(coords.get(0))); radarIntent.putExtra("longitude", new Float(coords.get(1))); activity.startActivity(radarIntent); } else { AlertDialog.Builder dialog = new AlertDialog.Builder(activity); dialog.setTitle(res.getString(R.string.err_radar_title)); dialog.setMessage(res.getString(R.string.err_radar_message)); dialog.setCancelable(true); dialog.setPositiveButton("yes", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { try { activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:com.eclipsim.gpsstatus2"))); dialog.cancel(); } catch (Exception e) { warning.showToast(res.getString(R.string.err_radar_market)); Log.e(cgSettings.tag, "cgeopoint.radarTo.onClick: " + e.toString()); } } }); dialog.setNegativeButton("no", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); AlertDialog alert = dialog.create(); alert.show(); } } catch (Exception e) { warning.showToast(res.getString(R.string.err_radar_generic)); Log.e(cgSettings.tag, "cgeopoint.radarTo: " + e.toString()); } } >>>>>>>
<<<<<<< descView.setText(Html.fromHtml(cache.shortdesc.trim(), new HtmlImage(this, geocode, true, cache.reason, false), null), TextView.BufferType.SPANNABLE); ======= descView.setText(Html.fromHtml(cache.getShortdesc().trim(), new cgHtmlImg(this, geocode, true, cache.getReason(), false), null), TextView.BufferType.SPANNABLE); >>>>>>> descView.setText(Html.fromHtml(cache.getShortdesc().trim(), new HtmlImage(this, geocode, true, cache.getReason(), false), null), TextView.BufferType.SPANNABLE); <<<<<<< longDesc = Html.fromHtml(description.trim(), new HtmlImage(this, geocode, true, cache.reason, false), new UnknownTagsHandler()); ======= longDesc = Html.fromHtml(description.trim(), new cgHtmlImg(this, geocode, true, cache.getReason(), false), new UnknownTagsHandler()); >>>>>>> longDesc = Html.fromHtml(description.trim(), new HtmlImage(this, geocode, true, cache.getReason(), false), new UnknownTagsHandler()); <<<<<<< ((TextView) rowView.findViewById(R.id.log)).setText(Html.fromHtml(log.log, new HtmlImage(this, null, false, cache.reason, false), null), TextView.BufferType.SPANNABLE); ======= ((TextView) rowView.findViewById(R.id.log)).setText(Html.fromHtml(log.log, new cgHtmlImg(this, null, false, cache.getReason(), false), null), TextView.BufferType.SPANNABLE); >>>>>>> ((TextView) rowView.findViewById(R.id.log)).setText(Html.fromHtml(log.log, new HtmlImage(this, null, false, cache.getReason(), false), null), TextView.BufferType.SPANNABLE); <<<<<<< HtmlImage mapGetter = new HtmlImage(cgeodetail.this, cache.geocode, false, 0, false); ======= cgHtmlImg mapGetter = new cgHtmlImg(cgeodetail.this, cache.getGeocode(), false, 0, false); >>>>>>> HtmlImage mapGetter = new HtmlImage(cgeodetail.this, cache.getGeocode(), false, 0, false);
<<<<<<< if (recaptchaChallenge != null && StringUtils.isNotBlank(recaptchaText)) { params.append("&"); params.append("recaptcha_challenge_field="); ======= if (recaptchaChallenge != null && recaptchaText != null && recaptchaText.length() > 0) { params.append("&recaptcha_challenge_field="); >>>>>>> if (recaptchaChallenge != null && StringUtils.isNotBlank(recaptchaText)) { params.append("&recaptcha_challenge_field="); <<<<<<< while (matcherWpType.find()) { if (matcherWpType.groupCount() > 0) { waypoint.type = matcherWpType.group(1); if (StringUtils.isNotBlank(waypoint.type)) { waypoint.type = waypoint.type.trim(); } } ======= if (matcherWpType.find() && matcherWpType.groupCount() > 0) { waypoint.type = matcherWpType.group(1).trim(); >>>>>>> if (matcherWpType.find() && matcherWpType.groupCount() > 0) { waypoint.type = matcherWpType.group(1).trim(); <<<<<<< while (matcherWpPrefix.find()) { if (matcherWpPrefix.groupCount() > 1) { waypoint.prefix = matcherWpPrefix.group(2); if (StringUtils.isNotBlank(waypoint.prefix)) { waypoint.prefix = waypoint.prefix.trim(); } } ======= if (matcherWpPrefix.find() && matcherWpPrefix.groupCount() > 1) { waypoint.prefix = matcherWpPrefix.group(2).trim(); >>>>>>> if (matcherWpPrefix.find() && matcherWpPrefix.groupCount() > 1) { waypoint.prefix = matcherWpPrefix.group(2).trim(); <<<<<<< while (matcherWpLookup.find()) { if (matcherWpLookup.groupCount() > 1) { waypoint.lookup = matcherWpLookup.group(2); if (StringUtils.isNotBlank(waypoint.lookup)) { waypoint.lookup = waypoint.lookup.trim(); } } ======= if (matcherWpLookup.find() && matcherWpLookup.groupCount() > 1) { waypoint.lookup = matcherWpLookup.group(2).trim(); >>>>>>> if (matcherWpLookup.find() && matcherWpLookup.groupCount() > 1) { waypoint.lookup = matcherWpLookup.group(2).trim(); <<<<<<< while (matcherWpName.find()) { if (matcherWpName.groupCount() > 0) { waypoint.name = matcherWpName.group(1); if (StringUtils.isNotBlank(waypoint.name)) { waypoint.name = waypoint.name.trim(); } } ======= if (matcherWpName.find() && matcherWpName.groupCount() > 0) { waypoint.name = matcherWpName.group(1).trim(); >>>>>>> while (matcherWpName.find()) { if (matcherWpName.groupCount() > 0) { waypoint.name = matcherWpName.group(1); if (StringUtils.isNotBlank(waypoint.name)) { waypoint.name = waypoint.name.trim(); } } if (matcherWpName.find() && matcherWpName.groupCount() > 0) { waypoint.name = matcherWpName.group(1).trim(); } <<<<<<< while (matcherWpNote.find()) { if (matcherWpNote.groupCount() > 0) { waypoint.note = matcherWpNote.group(1); if (StringUtils.isNotBlank(waypoint.note)) { waypoint.note = waypoint.note.trim(); } } ======= if (matcherWpNote.find() && matcherWpNote.groupCount() > 0) { waypoint.note = matcherWpNote.group(1).trim(); >>>>>>> if (matcherWpNote.find() && matcherWpNote.groupCount() > 0) { waypoint.note = matcherWpNote.group(1).trim(); <<<<<<< final Matcher matcherDetailsImage = patternDetailsImage.matcher(page); while (matcherDetailsImage.find()) { if (matcherDetailsImage.groupCount() > 0) { final String image = matcherDetailsImage.group(3); final String details = matcherDetailsImage.group(4); if (StringUtils.isNotBlank(image)) { trackable.image = image; } if (StringUtils.isNotBlank(details)) { trackable.details = details; } ======= final Matcher matcherDetailsImage = PATTERN_TRACKABLE_DetailsImage.matcher(page); if (matcherDetailsImage.find() && matcherDetailsImage.groupCount() > 0) { final String image = matcherDetailsImage.group(3); final String details = matcherDetailsImage.group(4); if (image != null) { trackable.image = image; } if (details != null) { trackable.details = details; >>>>>>> final Matcher matcherDetailsImage = PATTERN_TRACKABLE_DetailsImage.matcher(page); if (matcherDetailsImage.find() && matcherDetailsImage.groupCount() > 0) { final String image = matcherDetailsImage.group(3); final String details = matcherDetailsImage.group(4); if (image != null) { trackable.image = image; } if (details != null) { trackable.details = details; <<<<<<< if (wpIcons.isEmpty()) { wpIcons.put("waypoint", R.drawable.marker_waypoint_waypoint); wpIcons.put("flag", R.drawable.marker_waypoint_flag); wpIcons.put("pkg", R.drawable.marker_waypoint_pkg); wpIcons.put("puzzle", R.drawable.marker_waypoint_puzzle); wpIcons.put("stage", R.drawable.marker_waypoint_stage); wpIcons.put("trailhead", R.drawable.marker_waypoint_trailhead); } int icon = -1; String iconTxt = null; if (cache) { if (StringUtils.isNotBlank(type)) { if (own) { iconTxt = type + "-own"; } else if (found) { iconTxt = type + "-found"; } else if (disabled) { iconTxt = type + "-disabled"; } else { iconTxt = type; } } else { iconTxt = "traditional"; } if (gcIcons.containsKey(iconTxt)) { icon = gcIcons.get(iconTxt); } else { icon = gcIcons.get("traditional"); } } else { if (StringUtils.isNotBlank(type)) { iconTxt = type; } else { iconTxt = "waypoint"; } if (wpIcons.containsKey(iconTxt)) { icon = wpIcons.get(iconTxt); } else { icon = wpIcons.get("waypoint"); } } return icon; ======= >>>>>>>
<<<<<<< import java.util.Date; import java.util.EnumSet; ======= >>>>>>> import java.util.EnumSet;
<<<<<<< ======= import cgeo.geocaching.geopoint.Geopoint; import cgeo.geocaching.utils.CollectionUtils; >>>>>>> import cgeo.geocaching.geopoint.Geopoint; <<<<<<< public boolean invoke(cgGeo geo, Activity activity, Resources res, cgCache cache, final UUID searchId, cgWaypoint waypoint, Double latitude, Double longitude) { if (cache == null && waypoint == null && latitude == null && longitude == null) { ======= public boolean invoke(cgGeo geo, Activity activity, Resources res, cgCache cache, final UUID searchId, cgWaypoint waypoint, final Geopoint coords) { if (cache == null && waypoint == null && coords == null) { >>>>>>> public boolean invoke(cgGeo geo, Activity activity, Resources res, cgCache cache, final UUID searchId, cgWaypoint waypoint, final Geopoint coords) { if (cache == null && waypoint == null && coords == null) { <<<<<<< ======= try { if (isInstalled(activity)) { final List<cgWaypoint> waypoints = new ArrayList<cgWaypoint>(); // get only waypoints with coordinates if (cache != null && cache.waypoints != null && cache.waypoints.isEmpty() == false) { for (cgWaypoint wp : cache.waypoints) { if (wp.coords != null) { waypoints.add(wp); } } } >>>>>>>
<<<<<<< import cgeo.geocaching.geopoint.Geopoint; ======= import cgeo.geocaching.geopoint.Geopoint; import cgeo.geocaching.geopoint.Geopoint.MalformedCoordinateException; import cgeo.geocaching.geopoint.GeopointFormatter; import cgeo.geocaching.geopoint.GeopointParser.ParseException; >>>>>>> import cgeo.geocaching.geopoint.Geopoint; import cgeo.geocaching.geopoint.Geopoint.MalformedCoordinateException; import cgeo.geocaching.geopoint.GeopointFormatter; import cgeo.geocaching.geopoint.GeopointParser.ParseException; <<<<<<< private Geopoint coords = new Geopoint(0, 0); ======= private Geopoint gp = null; >>>>>>> private Geopoint gp = null; <<<<<<< if (waypoint != null) { coords = waypoint.coords; } else if (geo != null && geo.coordsNow != null) { coords = geo.coordsNow; ======= if (gpIn != null) { gp = gpIn; } else if (geo != null && geo.latitudeNow != null && geo.longitudeNow != null) { gp = new Geopoint(geo.latitudeNow, geo.longitudeNow); >>>>>>> if (gpIn != null) { gp = gpIn; } else if (geo != null && geo.coordsNow != null) { gp = geo.coordsNow; <<<<<<< double latitude = 0.0; double longitude = 0.0; double lat = 0.0; double lon = 0.0; if (coords != null) { latitude = coords.getLatitude(); if (latitude < 0) { bLat.setText("S"); } else { bLat.setText("N"); } lat = Math.abs(latitude); longitude = coords.getLongitude(); if (longitude < 0) { bLon.setText("W"); } else { bLon.setText("E"); } ======= if (gp == null) return; Double lat = 0.0; if (gp.getLatitude() < 0) { bLat.setText("S"); } else { bLat.setText("N"); } >>>>>>> if (gp == null) return; Double lat = 0.0; if (gp.getLatitude() < 0) { bLat.setText("S"); } else { bLat.setText("N"); } <<<<<<< ======= lon = Math.abs(gp.getLongitude()); >>>>>>> lon = Math.abs(gp.getLongitude()); <<<<<<< if (coords != null) { eLat.setText(cgBase.formatLatitude(latitude, true)); eLon.setText(cgBase.formatLongitude(longitude, true)); } ======= eLat.setText(gp.format(GeopointFormatter.Format.LAT_DECMINUTE)); eLon.setText(gp.format(GeopointFormatter.Format.LON_DECMINUTE)); >>>>>>> eLat.setText(gp.format(GeopointFormatter.Format.LAT_DECMINUTE)); eLon.setText(gp.format(GeopointFormatter.Format.LON_DECMINUTE)); <<<<<<< if (coords != null) { eLatDeg.setText(addZeros(latDeg, 2) + Integer.toString(latDeg)); eLatMin.setText(addZeros(latDegFrac, 5) + Integer.toString(latDegFrac)); eLonDeg.setText(addZeros(latDeg, 3) + Integer.toString(lonDeg)); eLonMin.setText(addZeros(lonDegFrac, 5) + Integer.toString(lonDegFrac)); } ======= eLatDeg.setText(addZeros(latDeg, 2) + Integer.toString(latDeg)); eLatMin.setText(addZeros(latDegFrac, 5) + Integer.toString(latDegFrac)); eLonDeg.setText(addZeros(latDeg, 3) + Integer.toString(lonDeg)); eLonMin.setText(addZeros(lonDegFrac, 5) + Integer.toString(lonDegFrac)); >>>>>>> eLatDeg.setText(addZeros(latDeg, 2) + Integer.toString(latDeg)); eLatMin.setText(addZeros(latDegFrac, 5) + Integer.toString(latDegFrac)); eLonDeg.setText(addZeros(latDeg, 3) + Integer.toString(lonDeg)); eLonMin.setText(addZeros(lonDegFrac, 5) + Integer.toString(lonDegFrac)); <<<<<<< if (coords != null) { eLatDeg.setText(addZeros(latDeg, 2) + Integer.toString(latDeg)); eLatMin.setText(addZeros(latMin, 2) + Integer.toString(latMin)); eLatSec.setText(addZeros(latMinFrac, 3) + Integer.toString(latMinFrac)); eLonDeg.setText(addZeros(lonDeg, 3) + Integer.toString(lonDeg)); eLonMin.setText(addZeros(lonMin, 2) + Integer.toString(lonMin)); eLonSec.setText(addZeros(lonMinFrac, 3) + Integer.toString(lonMinFrac)); } ======= eLatDeg.setText(addZeros(latDeg, 2) + Integer.toString(latDeg)); eLatMin.setText(addZeros(latMin, 2) + Integer.toString(latMin)); eLatSec.setText(addZeros(latMinFrac, 3) + Integer.toString(latMinFrac)); eLonDeg.setText(addZeros(lonDeg, 3) + Integer.toString(lonDeg)); eLonMin.setText(addZeros(lonMin, 2) + Integer.toString(lonMin)); eLonSec.setText(addZeros(lonMinFrac, 3) + Integer.toString(lonMinFrac)); >>>>>>> eLatDeg.setText(addZeros(latDeg, 2) + Integer.toString(latDeg)); eLatMin.setText(addZeros(latMin, 2) + Integer.toString(latMin)); eLatSec.setText(addZeros(latMinFrac, 3) + Integer.toString(latMinFrac)); eLonDeg.setText(addZeros(lonDeg, 3) + Integer.toString(lonDeg)); eLonMin.setText(addZeros(lonMin, 2) + Integer.toString(lonMin)); eLonSec.setText(addZeros(lonMinFrac, 3) + Integer.toString(lonMinFrac)); <<<<<<< if (coords != null) { eLatDeg.setText(addZeros(latDeg, 2) + Integer.toString(latDeg)); eLatMin.setText(addZeros(latMin, 2) + Integer.toString(latMin)); eLatSec.setText(addZeros(latSec, 2) + Integer.toString(latSec)); eLatSub.setText(addZeros(latSecFrac, 3) + Integer.toString(latSecFrac)); eLonDeg.setText(addZeros(lonDeg, 3) + Integer.toString(lonDeg)); eLonMin.setText(addZeros(lonMin, 2) + Integer.toString(lonMin)); eLonSec.setText(addZeros(lonSec, 2) + Integer.toString(lonSec)); eLonSub.setText(addZeros(lonSecFrac, 3) + Integer.toString(lonSecFrac)); } ======= eLatDeg.setText(addZeros(latDeg, 2) + Integer.toString(latDeg)); eLatMin.setText(addZeros(latMin, 2) + Integer.toString(latMin)); eLatSec.setText(addZeros(latSec, 2) + Integer.toString(latSec)); eLatSub.setText(addZeros(latSecFrac, 3) + Integer.toString(latSecFrac)); eLonDeg.setText(addZeros(lonDeg, 3) + Integer.toString(lonDeg)); eLonMin.setText(addZeros(lonMin, 2) + Integer.toString(lonMin)); eLonSec.setText(addZeros(lonSec, 2) + Integer.toString(lonSec)); eLonSub.setText(addZeros(lonSecFrac, 3) + Integer.toString(lonSecFrac)); >>>>>>> eLatDeg.setText(addZeros(latDeg, 2) + Integer.toString(latDeg)); eLatMin.setText(addZeros(latMin, 2) + Integer.toString(latMin)); eLatSec.setText(addZeros(latSec, 2) + Integer.toString(latSec)); eLatSub.setText(addZeros(latSecFrac, 3) + Integer.toString(latSecFrac)); eLonDeg.setText(addZeros(lonDeg, 3) + Integer.toString(lonDeg)); eLonMin.setText(addZeros(lonMin, 2) + Integer.toString(lonMin)); eLonSec.setText(addZeros(lonSec, 2) + Integer.toString(lonSec)); eLonSub.setText(addZeros(lonSecFrac, 3) + Integer.toString(lonSecFrac)); <<<<<<< double latitude = 0.0; double longitude = 0.0; ======= Double latitude = 0.0; Double longitude = 0.0; >>>>>>> double latitude = 0.0; double longitude = 0.0; <<<<<<< coords = new Geopoint(latitude, longitude); ======= try { gp = new Geopoint(latitude, longitude); } catch (MalformedCoordinateException e) { context.showToast(context.getResources().getString(R.string.err_invalid_lat_lon)); return false; } return true; >>>>>>> try { gp = new Geopoint(latitude, longitude); } catch (MalformedCoordinateException e) { context.showToast(context.getResources().getString(R.string.err_invalid_lat_lon)); return false; } return true; <<<<<<< coords = geo.coordsNow; ======= gp = new Geopoint(geo.latitudeNow, geo.longitudeNow); >>>>>>> gp = geo.coordsNow; <<<<<<< if (currentFormat == coordInputFormatEnum.Plain) { if (eLat.length() > 0 && eLon.length() > 0) { // latitude & longitude Map<String, Object> latParsed = cgBase.parseCoordinate(eLat.getText().toString(), "lat"); Map<String, Object> lonParsed = cgBase.parseCoordinate(eLon.getText().toString(), "lon"); if (latParsed == null || latParsed.get("coordinate") == null || latParsed.get("string") == null) { context.showToast(context.getResources().getString(R.string.err_parse_lat)); return; } if (lonParsed == null || lonParsed.get("coordinate") == null || lonParsed.get("string") == null) { context.showToast(context.getResources().getString(R.string.err_parse_lon)); return; } coords = new Geopoint((Double) latParsed.get("coordinate"), (Double) lonParsed.get("coordinate")); } else { if (geo == null || geo.coordsNow == null) { context.showToast(context.getResources().getString(R.string.err_point_curr_position_unavailable)); return; } coords = geo.coordsNow; } } cuListener.update(coords); ======= if (calc() == false) return; if (gp != null) cuListener.update(gp); >>>>>>> if (calc() == false) return; if (gp != null) cuListener.update(gp); <<<<<<< public void update(final Geopoint coords); ======= public void update(Geopoint gp); >>>>>>> public void update(final Geopoint gp);
<<<<<<< public TinkerGraphTest() { this.allowsDuplicateEdges = true; this.allowsSelfLoops = true; this.ignoresSuppliedIds = false; this.isPersistent = true; this.isRDFModel = false; this.supportsVertexIteration = true; this.supportsEdgeIteration = true; this.supportsVertexIndex = true; this.supportsEdgeIndex = true; this.supportsTransactions = false; this.allowSerializableObjectProperty = true; this.allowBooleanProperty = true; this.allowDoubleProperty = true; this.allowFloatProperty = true; this.allowIntegerProperty = true; this.allowPrimitiveArrayProperty = true; this.allowListProperty = true; this.allowLongProperty = true; this.allowMapProperty = true; this.allowStringProperty = true; } /*public void testTinkerBenchmarkTestSuite() throws Exception { this.stopWatch(); doTestSuite(new TinkerBenchmarkTestSuite(this)); printTestPerformance("TinkerBenchmarkTestSuite", this.stopWatch()); }*/ public void testVertexTestSuite() throws Exception { this.stopWatch(); doTestSuite(new VertexTestSuite(this)); printTestPerformance("VertexTestSuite", this.stopWatch()); } public void testEdgeTestSuite() throws Exception { this.stopWatch(); doTestSuite(new EdgeTestSuite(this)); printTestPerformance("EdgeTestSuite", this.stopWatch()); } public void testGraphTestSuite() throws Exception { this.stopWatch(); doTestSuite(new GraphTestSuite(this)); printTestPerformance("GraphTestSuite", this.stopWatch()); } public void testIndexableGraphTestSuite() throws Exception { this.stopWatch(); doTestSuite(new IndexableGraphTestSuite(this)); printTestPerformance("IndexableGraphTestSuite", this.stopWatch()); } public void testIndexTestSuite() throws Exception { this.stopWatch(); doTestSuite(new IndexTestSuite(this)); printTestPerformance("IndexTestSuite", this.stopWatch()); } public void testAutomaticIndexTestSuite() throws Exception { this.stopWatch(); doTestSuite(new AutomaticIndexTestSuite(this)); printTestPerformance("AutomaticIndexTestSuite", this.stopWatch()); } public void testGraphMLReaderTestSuite() throws Exception { this.stopWatch(); doTestSuite(new GraphMLReaderTestSuite(this)); printTestPerformance("GraphMLReaderTestSuite", this.stopWatch()); } public void testGraphSONReaderTestSuite() throws Exception { this.stopWatch(); doTestSuite(new GraphSONReaderTestSuite(this)); printTestPerformance("GraphSONReaderTestSuite", this.stopWatch()); } public Graph getGraphInstance() { String directory = System.getProperty("tinkerGraphDirectory"); if (directory == null) directory = this.getWorkingDirectory(); return new TinkerGraph(directory); } private String getWorkingDirectory() { String directory = System.getProperty("tinkerGraphDirectory"); if (directory == null) { if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) directory = "C:/temp/blueprints_test"; else directory = "/tmp/blueprints_test"; } return directory; } public void doTestSuite(final TestSuite testSuite) throws Exception { String doTest = System.getProperty("testTinkerGraph"); if (doTest == null || doTest.equals("true")) { String directory = System.getProperty("tinkerGraphDirectory"); if (directory == null) directory = this.getWorkingDirectory(); deleteDirectory(new File(directory)); for (Method method : testSuite.getClass().getDeclaredMethods()) { if (method.getName().startsWith("test")) { System.out.println("Testing " + method.getName() + "..."); method.invoke(testSuite); deleteDirectory(new File(directory)); } } } } ======= public TinkerGraphTest() { allowsDuplicateEdges = true; allowsSelfLoops = true; ignoresSuppliedIds = false; isPersistent = true; isRDFModel = false; supportsVertexIteration = true; supportsEdgeIteration = true; supportsVertexIndex = true; supportsEdgeIndex = true; supportsTransactions = false; allowSerializableObjectProperty = true; allowBooleanProperty = true; allowDoubleProperty = true; allowFloatProperty = true; allowIntegerProperty = true; allowPrimitiveArrayProperty = true; allowListProperty = true; allowLongProperty = true; allowMapProperty = true; allowStringProperty = true; } /* * public void testTinkerBenchmarkTestSuite() throws Exception { this.stopWatch(); doTestSuite(new * TinkerBenchmarkTestSuite(this)); printTestPerformance("TinkerBenchmarkTestSuite", this.stopWatch()); } */ public void testVertexTestSuite() throws Exception { this.stopWatch(); doTestSuite(new VertexTestSuite(this)); printTestPerformance("VertexTestSuite", this.stopWatch()); } public void testEdgeTestSuite() throws Exception { this.stopWatch(); doTestSuite(new EdgeTestSuite(this)); printTestPerformance("EdgeTestSuite", this.stopWatch()); } public void testGraphTestSuite() throws Exception { this.stopWatch(); doTestSuite(new GraphTestSuite(this)); printTestPerformance("GraphTestSuite", this.stopWatch()); } public void testIndexableGraphTestSuite() throws Exception { this.stopWatch(); doTestSuite(new IndexableGraphTestSuite(this)); printTestPerformance("IndexableGraphTestSuite", this.stopWatch()); } public void testIndexTestSuite() throws Exception { this.stopWatch(); doTestSuite(new IndexTestSuite(this)); printTestPerformance("IndexTestSuite", this.stopWatch()); } public void testAutomaticIndexTestSuite() throws Exception { this.stopWatch(); doTestSuite(new AutomaticIndexTestSuite(this)); printTestPerformance("AutomaticIndexTestSuite", this.stopWatch()); } public void testGraphMLReaderTestSuite() throws Exception { this.stopWatch(); doTestSuite(new GraphMLReaderTestSuite(this)); printTestPerformance("GraphMLReaderTestSuite", this.stopWatch()); } public void testGMLReaderTestSuite() throws Exception { this.stopWatch(); doTestSuite(new GMLReaderTestSuite(this)); printTestPerformance("GMLReaderTestSuite", this.stopWatch()); } @Override public Graph getGraphInstance() { String directory = System.getProperty("tinkerGraphDirectory"); if (directory == null) { directory = this.getWorkingDirectory(); } return new TinkerGraph(directory); } private String getWorkingDirectory() { String directory = System.getProperty("tinkerGraphDirectory"); if (directory == null) { if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) { directory = "C:/temp/blueprints_test"; } else { directory = "/tmp/blueprints_test"; } } return directory; } @Override public void doTestSuite(final TestSuite testSuite) throws Exception { String doTest = System.getProperty("testTinkerGraph"); if (doTest == null || doTest.equals("true")) { String directory = System.getProperty("tinkerGraphDirectory"); if (directory == null) { directory = this.getWorkingDirectory(); } deleteDirectory(new File(directory)); for (Method method : testSuite.getClass().getDeclaredMethods()) { if (method.getName().startsWith("test")) { System.out.println("Testing " + method.getName() + "..."); method.invoke(testSuite); deleteDirectory(new File(directory)); } } } } >>>>>>> public TinkerGraphTest() { allowsDuplicateEdges = true; allowsSelfLoops = true; ignoresSuppliedIds = false; isPersistent = true; isRDFModel = false; supportsVertexIteration = true; supportsEdgeIteration = true; supportsVertexIndex = true; supportsEdgeIndex = true; supportsTransactions = false; allowSerializableObjectProperty = true; allowBooleanProperty = true; allowDoubleProperty = true; allowFloatProperty = true; allowIntegerProperty = true; allowPrimitiveArrayProperty = true; allowListProperty = true; allowLongProperty = true; allowMapProperty = true; allowStringProperty = true; } /* * public void testTinkerBenchmarkTestSuite() throws Exception { this.stopWatch(); doTestSuite(new * TinkerBenchmarkTestSuite(this)); printTestPerformance("TinkerBenchmarkTestSuite", this.stopWatch()); } */ public void testVertexTestSuite() throws Exception { this.stopWatch(); doTestSuite(new VertexTestSuite(this)); printTestPerformance("VertexTestSuite", this.stopWatch()); } public void testEdgeTestSuite() throws Exception { this.stopWatch(); doTestSuite(new EdgeTestSuite(this)); printTestPerformance("EdgeTestSuite", this.stopWatch()); } public void testGraphTestSuite() throws Exception { this.stopWatch(); doTestSuite(new GraphTestSuite(this)); printTestPerformance("GraphTestSuite", this.stopWatch()); } public void testIndexableGraphTestSuite() throws Exception { this.stopWatch(); doTestSuite(new IndexableGraphTestSuite(this)); printTestPerformance("IndexableGraphTestSuite", this.stopWatch()); } public void testIndexTestSuite() throws Exception { this.stopWatch(); doTestSuite(new IndexTestSuite(this)); printTestPerformance("IndexTestSuite", this.stopWatch()); } public void testAutomaticIndexTestSuite() throws Exception { this.stopWatch(); doTestSuite(new AutomaticIndexTestSuite(this)); printTestPerformance("AutomaticIndexTestSuite", this.stopWatch()); } public void testGraphMLReaderTestSuite() throws Exception { this.stopWatch(); doTestSuite(new GraphMLReaderTestSuite(this)); printTestPerformance("GraphMLReaderTestSuite", this.stopWatch()); } public void testGraphSONReaderTestSuite() throws Exception { this.stopWatch(); doTestSuite(new GraphSONReaderTestSuite(this)); printTestPerformance("GraphSONReaderTestSuite", this.stopWatch()); } public void testGMLReaderTestSuite() throws Exception { this.stopWatch(); doTestSuite(new GMLReaderTestSuite(this)); printTestPerformance("GMLReaderTestSuite", this.stopWatch()); } @Override public Graph getGraphInstance() { String directory = System.getProperty("tinkerGraphDirectory"); if (directory == null) { directory = this.getWorkingDirectory(); } return new TinkerGraph(directory); } private String getWorkingDirectory() { String directory = System.getProperty("tinkerGraphDirectory"); if (directory == null) { if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) { directory = "C:/temp/blueprints_test"; } else { directory = "/tmp/blueprints_test"; } } return directory; } @Override public void doTestSuite(final TestSuite testSuite) throws Exception { String doTest = System.getProperty("testTinkerGraph"); if (doTest == null || doTest.equals("true")) { String directory = System.getProperty("tinkerGraphDirectory"); if (directory == null) { directory = this.getWorkingDirectory(); } deleteDirectory(new File(directory)); for (Method method : testSuite.getClass().getDeclaredMethods()) { if (method.getName().startsWith("test")) { System.out.println("Testing " + method.getName() + "..."); method.invoke(testSuite); deleteDirectory(new File(directory)); } } } }
<<<<<<< this.start = this.start + this.graph.getBufferSize(); this.end = this.end + this.graph.getBufferSize(); ======= >>>>>>>
<<<<<<< import org.apache.roller.weblogger.pojos.*; import java.util.*; ======= import org.apache.roller.weblogger.pojos.ThemeTemplate; import org.apache.roller.weblogger.pojos.Weblog; import org.apache.roller.weblogger.pojos.WeblogCategory; import org.apache.roller.weblogger.pojos.WeblogEntry; import org.apache.roller.weblogger.pojos.WeblogEntryComment; import org.apache.roller.weblogger.pojos.WeblogReferrer; import org.apache.roller.weblogger.util.HTMLSanitizer; >>>>>>> import org.apache.roller.weblogger.pojos.*; import org.apache.roller.weblogger.util.HTMLSanitizer; import java.util.*;
<<<<<<< @AllowedMethods({"execute","save"}) public class FolderEdit extends UIAction implements ServletResponseAware { ======= // TODO: make this work @AllowedMethods({"execute","save"}) public class FolderEdit extends UIAction { >>>>>>> // TODO: make this work @AllowedMethods({"execute","save"}) public class FolderEdit extends UIAction implements ServletResponseAware {
<<<<<<< ======= // only work on props that were submitted with the request if(incomingProp != null) { log.debug("Setting new value for ["+propName+"]"); // NOTE: the old way had some locale sensitive way to do this?? updProp.setValue(incomingProp.trim()); } >>>>>>>
<<<<<<< if (curEditor == null && file != null) { OpenFileDescriptor descriptor = new OpenFileDescriptor(project, file); ======= if (curEditor == null) { OpenFileDescriptor descriptor = new OpenFileDescriptor(project, file, start.getLine(), start.getCharacter()); >>>>>>> if (curEditor == null && file != null) { OpenFileDescriptor descriptor = new OpenFileDescriptor(project, file, start.getLine(), start.getCharacter());
<<<<<<< import org.apache.hama.bsp.message.MemoryQueue; import org.apache.hama.bsp.message.MessageEventListener; ======= import org.apache.hama.bsp.message.AbstractMessageManager; >>>>>>> import org.apache.hama.bsp.message.AbstractMessageManager; <<<<<<< import org.apache.hama.bsp.message.MessageQueue; import org.apache.hama.bsp.sync.BSPPeerSyncClient; ======= >>>>>>> import org.apache.hama.bsp.sync.BSPPeerSyncClient; <<<<<<< @Override public Iterator<Entry<InetSocketAddress, MessageQueue<M>>> getMessageIterator() { return localOutgoingMessages.entrySet().iterator(); } @Override public void clearOutgoingQueues() { localOutgoingMessages.clear(); } @Override public int getNumCurrentMessages() { return localIncomingMessages.size(); } @Override public void finishSendPhase() throws IOException { } @Override public void loopBackMessages(BSPMessageBundle<? extends Writable> bundle) { for (Writable value : bundle.getMessages()) { loopBackMessage(value); } } @SuppressWarnings("unchecked") @Override public void loopBackMessage(Writable message) { localIncomingMessages.add((M)message); peer.incrementCounter(BSPPeerImpl.PeerCounter.TOTAL_MESSAGES_RECEIVED, 1L); } @Override public void registerListener(MessageEventListener<M> listener) throws IOException { } ======= >>>>>>>
<<<<<<< /* * Copyright (C) 2012-2019 52°North Initiative for Geospatial Open Source ======= /** * Copyright (C) 2012-2020 52°North Initiative for Geospatial Open Source >>>>>>> /* * Copyright (C) 2012-2020 52°North Initiative for Geospatial Open Source
<<<<<<< import net.minecraft.util.ActionResult; ======= import net.minecraft.stat.Stats; >>>>>>> import net.minecraft.util.ActionResult; import net.minecraft.stat.Stats; <<<<<<< cir.setReturnValue(ActionResult.SUCCESS); ======= player.incrementStat(Stats.INTERACT_WITH_CRAFTING_TABLE); cir.setReturnValue(true); >>>>>>> player.incrementStat(Stats.INTERACT_WITH_CRAFTING_TABLE); cir.setReturnValue(ActionResult.SUCCESS);
<<<<<<< import railo.runtime.type.it.StringIterator; import railo.runtime.type.util.KeyConstants; ======= import railo.runtime.type.util.KeyConstants; >>>>>>> import railo.runtime.type.it.StringIterator; import railo.runtime.type.util.KeyConstants; <<<<<<< //if(lkey.equals(PATH_INFO)) return toString(req.getAttribute("javax.servlet.include.path_info")); if(key.equals(KeyConstants._path_translated)) { ======= if(key.equals(PATH_TRANSLATED)) { >>>>>>> if(key.equals(KeyConstants._path_translated)) {
<<<<<<< public static class TogglingDispenserBehaviour extends ItemDispenserBehavior { private static Set<Block> toggleable = Sets.newHashSet( Blocks.STONE_BUTTON, Blocks.ACACIA_BUTTON, Blocks.BIRCH_BUTTON, Blocks.DARK_OAK_BUTTON, Blocks.JUNGLE_BUTTON, Blocks.OAK_BUTTON, Blocks.SPRUCE_BUTTON, Blocks.REPEATER, Blocks.COMPARATOR, Blocks.LEVER, Blocks.DAYLIGHT_DETECTOR, Blocks.REDSTONE_ORE, Blocks.BELL, Blocks.JUKEBOX ); @Override protected ItemStack dispenseSilently(BlockPointer source, ItemStack stack) { if(!CarpetExtraSettings.dispensersToggleThings) { return super.dispenseSilently(source, stack); } World world = source.getWorld(); Direction direction = (Direction) source.getBlockState().get(DispenserBlock.FACING); BlockPos pos = source.getBlockPos().offset(direction); BlockState state = world.getBlockState(pos); if(toggleable.contains(state.getBlock())) { boolean bool = state.activate( world, null, Hand.MAIN_HAND, new BlockHitResult( new Vec3d(new Vec3i(pos.getX(), pos.getY(), pos.getZ())), direction, pos, false ) ); if(bool) return stack; } return super.dispenseSilently(source, stack); } } ======= public static class FeedAnimalDispenserBehaviour extends ItemDispenserBehavior { @Override protected ItemStack dispenseSilently(BlockPointer source, ItemStack stack) { if(!CarpetExtraSettings.dispensersFeedAnimals) { return super.dispenseSilently(source, stack); } BlockPos pos = source.getBlockPos().offset((Direction) source.getBlockState().get(DispenserBlock.FACING)); List<AnimalEntity> list = source.getWorld().<AnimalEntity>getEntities(AnimalEntity.class, new Box(pos)); boolean failure = false; for(AnimalEntity mob : list) { if(!mob.isBreedingItem(stack)) continue; if(mob.getBreedingAge() != 0 || mob.isInLove()) { failure = true; continue; } stack.decrement(1); mob.lovePlayer(null); return stack; } if(failure) return stack; return super.dispenseSilently(source, stack); } } >>>>>>> public static class TogglingDispenserBehaviour extends ItemDispenserBehavior { private static Set<Block> toggleable = Sets.newHashSet( Blocks.STONE_BUTTON, Blocks.ACACIA_BUTTON, Blocks.BIRCH_BUTTON, Blocks.DARK_OAK_BUTTON, Blocks.JUNGLE_BUTTON, Blocks.OAK_BUTTON, Blocks.SPRUCE_BUTTON, Blocks.REPEATER, Blocks.COMPARATOR, Blocks.LEVER, Blocks.DAYLIGHT_DETECTOR, Blocks.REDSTONE_ORE, Blocks.BELL, Blocks.JUKEBOX ); @Override protected ItemStack dispenseSilently(BlockPointer source, ItemStack stack) { if(!CarpetExtraSettings.dispensersToggleThings) { return super.dispenseSilently(source, stack); } World world = source.getWorld(); Direction direction = (Direction) source.getBlockState().get(DispenserBlock.FACING); BlockPos pos = source.getBlockPos().offset(direction); BlockState state = world.getBlockState(pos); if(toggleable.contains(state.getBlock())) { boolean bool = state.activate( world, null, Hand.MAIN_HAND, new BlockHitResult( new Vec3d(new Vec3i(pos.getX(), pos.getY(), pos.getZ())), direction, pos, false ) ); if(bool) return stack; } } } public static class FeedAnimalDispenserBehaviour extends ItemDispenserBehavior { @Override protected ItemStack dispenseSilently(BlockPointer source, ItemStack stack) { if(!CarpetExtraSettings.dispensersFeedAnimals) { return super.dispenseSilently(source, stack); } BlockPos pos = source.getBlockPos().offset((Direction) source.getBlockState().get(DispenserBlock.FACING)); List<AnimalEntity> list = source.getWorld().<AnimalEntity>getEntities(AnimalEntity.class, new Box(pos)); boolean failure = false; for(AnimalEntity mob : list) { if(!mob.isBreedingItem(stack)) continue; if(mob.getBreedingAge() != 0 || mob.isInLove()) { failure = true; continue; } stack.decrement(1); mob.lovePlayer(null); return stack; } if(failure) return stack; return super.dispenseSilently(source, stack); } }
<<<<<<< private static final long serialVersionUID = -8902836175312356628L; private static final Collection.Key KEY_ATTRIBUTES = KeyImpl.getInstance("attributes"); ======= private static final Collection.Key KEY_ATTRIBUTES = KeyImpl.intern("attributes"); >>>>>>> private static final long serialVersionUID = -8902836175312356628L; private static final Collection.Key KEY_ATTRIBUTES = KeyImpl.intern("attributes"); <<<<<<< Argument oldArgs=pc.as(); Local oldLocal=pc.localScope(); ======= Argument oldArgs=pc.argumentsScope(); Scope oldLocal=pc.localScope(); >>>>>>> Argument oldArgs=pc.argumentsScope(); Local oldLocal=pc.localScope();
<<<<<<< loadThreadQueue(configServer, config, doc); ======= loadMonitors(configServer,config,doc); >>>>>>> loadThreadQueue(configServer, config, doc); loadMonitors(configServer,config,doc);
<<<<<<< ConfigWebFactory.load(this, cwi, ConfigWebFactory.loadDocument(getConfigFile())); ConfigWebFactory.createContextFilesPost(getConfigDir(),cwi,sConfig); ======= ConfigWebFactory.load(this, cwi, ConfigWebFactory.loadDocument(getConfigFile()),isEventGatewayContext); ConfigWebFactory.createContextFilesPost(getConfigDir(),cwi); >>>>>>> ConfigWebFactory.load(this, cwi, ConfigWebFactory.loadDocument(getConfigFile()),isEventGatewayContext); ConfigWebFactory.createContextFilesPost(getConfigDir(),cwi,sConfig);
<<<<<<< public class ArgumentImpl extends ScopeSupport implements Argument { ======= public final class ArgumentImpl extends ScopeSupport implements ArgumentPro { >>>>>>> public final class ArgumentImpl extends ScopeSupport implements Argument {
<<<<<<< public static String getQueryString(HttpServletRequest req) { //String qs = req.getAttribute("javax.servlet.include.query_string"); return req.getQueryString(); } ======= public static String getHeader(HttpServletRequest request, String name,String defaultValue) { try { return request.getHeader(name); } catch(Throwable t){ return defaultValue; } } >>>>>>> public static String getQueryString(HttpServletRequest req) { //String qs = req.getAttribute("javax.servlet.include.query_string"); return req.getQueryString(); } public static String getHeader(HttpServletRequest request, String name,String defaultValue) { try { return request.getHeader(name); } catch(Throwable t){ return defaultValue; } }
<<<<<<< ======= //this.manager=other.manager; >>>>>>> <<<<<<< release(ThreadLocalPageContext.get()); } /** * @see railo.runtime.type.RequestScope#release(railo.runtime.PageContext) */ public void release(PageContext pc) { ======= release(ThreadLocalPageContext.get()); } public void release(PageContext pc) { >>>>>>> release(ThreadLocalPageContext.get()); } /** * @see railo.runtime.type.RequestScope#release(railo.runtime.PageContext) */ public void release(PageContext pc) {
<<<<<<< Page page = ComponentLoader.loadPage(pc, Caster.toString(obj), null,null); if(page.metaData!=null) return page.metaData; ======= PagePlus page = ComponentLoader.loadPage(pc, Caster.toString(obj), null,null); if(page.metaData!=null && page.metaData.get()!=null) return page.metaData.get(); >>>>>>> Page page = ComponentLoader.loadPage(pc, Caster.toString(obj), null,null); if(page.metaData!=null && page.metaData.get()!=null) return page.metaData.get();
<<<<<<< import railo.runtime.PageContextImpl; ======= import railo.runtime.config.ConfigImpl; >>>>>>> import railo.runtime.PageContextImpl; import railo.runtime.config.ConfigImpl;
<<<<<<< ps=pc.getRelativePageSource(pathWithCFC); if(ps!=null) { page=((PageSourceImpl)ps).loadPage(pc,null); if(page!=null){ if(doCache)config.putCachedPageSource(localCacheName, page.getPageSource()); return returnPage?page:load(pc,page,page.getPageSource(),trim(path.replace('/', '.')),isRealPath,interfaceUDFs); } ======= PageSource[] arr = ((PageContextImpl)pc).getRelativePageSources(pathWithCFC); page=PageSourceImpl.loadPage(pc, arr,null); if(page!=null){ if(doCache)config.putCachedPageSource(localCacheName, page.getPageSource()); return returnPage?page:load(pc,page,page.getPageSource(),trim(path.replace('/', '.')),isRealPath,interfaceUDFs); >>>>>>> PageSource[] arr = ((PageContextImpl)pc).getRelativePageSources(pathWithCFC); page=PageSourceImpl.loadPage(pc, arr,null); if(page!=null){ if(doCache)config.putCachedPageSource(localCacheName, page.getPageSource()); return returnPage?page:load(pc,page,page.getPageSource(),trim(path.replace('/', '.')),isRealPath,interfaceUDFs); <<<<<<< ImportDefintion[] impDefs=currP.getImportDefintions(); ======= ImportDefintion[] impDefs=pp==null?new ImportDefintion[0]:pp.getImportDefintions(); PageSource[] arr; >>>>>>> ImportDefintion[] impDefs=pp==null?new ImportDefintion[0]:pp.getImportDefintions(); PageSource[] arr; <<<<<<< ps=pc.getRelativePageSource(impDef.getPackageAsPath()+pathWithCFC); //print.o("ps1:"+ps.getDisplayPath()); page=((PageSourceImpl)ps).loadPage(pc,null); if(page!=null) { ======= arr = ((PageContextImpl)pc).getRelativePageSources(impDef.getPackageAsPath()+pathWithCFC); page=PageSourceImpl.loadPage(pc, arr,null); if(page!=null) { >>>>>>> arr = ((PageContextImpl)pc).getRelativePageSources(impDef.getPackageAsPath()+pathWithCFC); page=PageSourceImpl.loadPage(pc, arr,null); if(page!=null) { <<<<<<< ps=((PageContextImpl)pc).getPageSource("/"+impDef.getPackageAsPath()+pathWithCFC); page=((PageSourceImpl)ps).loadPage(pc,null); if(page!=null){ ======= page=PageSourceImpl.loadPage(pc, ((PageContextImpl)pc).getPageSources("/"+impDef.getPackageAsPath()+pathWithCFC), null); if(page!=null){ >>>>>>> page=PageSourceImpl.loadPage(pc, ((PageContextImpl)pc).getPageSources("/"+impDef.getPackageAsPath()+pathWithCFC), null); if(page!=null){ <<<<<<< ps=((PageContextImpl)pc).getPageSource(p); page=((PageSourceImpl)ps).loadPage(pc,null); ======= page=PageSourceImpl.loadPage(pc,((PageContextImpl)pc).getPageSources(p),null); >>>>>>> page=PageSourceImpl.loadPage(pc,((PageContextImpl)pc).getPageSources(p),null); <<<<<<< ps=pc.getRelativePageSource(path); if(ps==null) return null; page=((PageSourceImpl)ps).loadPage(pc,null); ======= arr = ((PageContextImpl)pc).getRelativePageSources(path); page=PageSourceImpl.loadPage(pc, arr, null); //if(ps==null) return null; //page=((PageSourceImpl)ps).loadPage(pc,pc.getConfig(),null); >>>>>>> arr = ((PageContextImpl)pc).getRelativePageSources(path); page=PageSourceImpl.loadPage(pc, arr, null); <<<<<<< page=((PageSourceImpl)ps).loadPage(pc,null); ======= page=PageSourceImpl.loadPage(pc,arr,null); //page=((PageSourceImpl)ps).loadPage(pc,pc.getConfig(),null); >>>>>>> page=PageSourceImpl.loadPage(pc,arr,null);
<<<<<<< ConfigWebFactory.load(null,configServer,doc); loadLabel(configServer,doc); ======= ConfigWebFactory.load(null,configServer,doc,false); >>>>>>> ConfigWebFactory.load(null,configServer,doc,false); loadLabel(configServer,doc);
<<<<<<< import railo.commons.io.res.Resource; import railo.commons.io.res.util.ResourceUtil; ======= import java.util.Iterator; >>>>>>> import railo.commons.io.res.Resource; import railo.commons.io.res.util.ResourceUtil; import java.util.Iterator; <<<<<<< import railo.runtime.type.Struct; ======= import railo.runtime.type.UDF; >>>>>>> import railo.runtime.type.Struct; import railo.runtime.type.UDF; <<<<<<< /** * @return the localMode */ public int getLocalMode() { return localMode; } /** * @param localMode the localMode to set */ public void setLocalMode(int localMode) { this.localMode = localMode; } /** * @return the sessionType */ public short getSessionType() { return sessionType; } /** * @return the sessionType */ public void setSessionType(short sessionType) { this.sessionType= sessionType; } /** * @return the sessionCluster */ public boolean getSessionCluster() { return sessionCluster; } /** * @param sessionCluster the sessionCluster to set */ public void setSessionCluster(boolean sessionCluster) { this.sessionCluster = sessionCluster; } /** * @return the clientCluster */ public boolean getClientCluster() { return clientCluster; } /** * @param clientCluster the clientCluster to set */ public void setClientCluster(boolean clientCluster) { this.clientCluster = clientCluster; } ======= /** * @see railo.runtime.util.ApplicationContextPro#getCustom(railo.runtime.type.Collection.Key) */ public Object getCustom(Collection.Key key) { Component cfc = getComponent(); if(cfc!=null){ try { ComponentWrap cw=new ComponentWrap(Component.ACCESS_PRIVATE, ComponentUtil.toComponentImpl(cfc)); return cw.get(key,null); } catch (PageException e) {} } return null; } >>>>>>> /** * @return the localMode */ public int getLocalMode() { return localMode; } /** * @param localMode the localMode to set */ public void setLocalMode(int localMode) { this.localMode = localMode; } /** * @return the sessionType */ public short getSessionType() { return sessionType; } /** * @return the sessionType */ public void setSessionType(short sessionType) { this.sessionType= sessionType; } /** * @return the sessionCluster */ public boolean getSessionCluster() { return sessionCluster; } /** * @param sessionCluster the sessionCluster to set */ public void setSessionCluster(boolean sessionCluster) { this.sessionCluster = sessionCluster; } /** * @return the clientCluster */ public boolean getClientCluster() { return clientCluster; } /** * @param clientCluster the clientCluster to set */ public void setClientCluster(boolean clientCluster) { this.clientCluster = clientCluster; } /* * @see railo.runtime.util.ApplicationContextPro#getCustom(railo.runtime.type.Collection.Key) */ public Object getCustom(Collection.Key key) { Component cfc = getComponent(); if(cfc!=null){ try { ComponentWrap cw=new ComponentWrap(Component.ACCESS_PRIVATE, ComponentUtil.toComponentImpl(cfc)); return cw.get(key,null); } catch (PageException e) {} } return null; }
<<<<<<< @Override ======= @Override public Iterator<Object> valueIterator() { return new ValueIterator(this, keys()); } /** * * @see railo.runtime.type.StructImpl#values() */ >>>>>>> @Override public Iterator<Object> valueIterator() { return new ValueIterator(this, keys()); } @Override
<<<<<<< import railo.runtime.listener.ApplicationContextPro; ======= import railo.runtime.listener.ApplicationContext; import railo.runtime.listener.ApplicationContextSupport; >>>>>>> import railo.runtime.listener.ApplicationContextPro; import railo.runtime.listener.ApplicationContext; import railo.runtime.listener.ApplicationContextSupport; <<<<<<< ApplicationContextPro ac; ======= ApplicationContextSupport ac; >>>>>>> ApplicationContextPro ac; <<<<<<< ac=(ApplicationContextPro) pageContext.getApplicationContext(); ======= ac= (ApplicationContextSupport)pageContext.getApplicationContext(); >>>>>>> ac=(ApplicationContextPro) pageContext.getApplicationContext(); <<<<<<< private boolean set(ApplicationContextPro ac) throws PageException { ======= private boolean set(ApplicationContextSupport ac) throws PageException { >>>>>>> private boolean set(ApplicationContextPro ac) throws PageException {
<<<<<<< private String uniqueId; ======= private boolean useOpenGlRenderer; >>>>>>> private String uniqueId; private boolean useOpenGlRenderer; <<<<<<< private Preferences(Resolution res, boolean fullscreen) { ======= public Preferences(Resolution res, boolean fullscreen, boolean useOpenGlRenderer) { >>>>>>> private Preferences(Resolution res, boolean fullscreen, boolean useOpenGlRenderer) { <<<<<<< /** * Gets the unique ID * @return uniqueId the unique ID */ public String getUniqueId() { return uniqueId; } ======= /** * Sets the OpenGL renderer use of this preference * @param useOpenGlRenderer whether to use OpenGL rendering */ public void setUseOpenGlRenderer(boolean useOpenGlRenderer) { this.useOpenGlRenderer = useOpenGlRenderer; } >>>>>>> /** * Gets the unique ID * @return uniqueId the unique ID */ public String getUniqueId() { return uniqueId; } /** * Sets the OpenGL renderer use of this preference * @param useOpenGlRenderer whether to use OpenGL rendering */ public void setUseOpenGlRenderer(boolean useOpenGlRenderer) { this.useOpenGlRenderer = useOpenGlRenderer; }
<<<<<<< PreparedStatement preStat = dc.getPreparedStatement(sql, createGeneratedKeys); ======= PreparedStatement preStat = ((DatasourceConnectionPro)dc).getPreparedStatement(sql, createGeneratedKeys,allowToCachePreperadeStatement); >>>>>>> PreparedStatement preStat = dc.getPreparedStatement(sql, createGeneratedKeys,allowToCachePreperadeStatement);
<<<<<<< import railo.runtime.functions.other.CreateUniqueId; ======= import railo.runtime.net.http.ReqRspUtil; >>>>>>> import railo.runtime.functions.other.CreateUniqueId; import railo.runtime.net.http.ReqRspUtil;
<<<<<<< public class ArgumentThreadImpl implements Argument,Sizeable { ======= public final class ArgumentThreadImpl implements ArgumentPro,Sizeable { >>>>>>> public final class ArgumentThreadImpl implements Argument,Sizeable {
<<<<<<< import railo.runtime.type.util.CollectionUtil; ======= import railo.runtime.type.scope.Argument; import railo.runtime.type.scope.ArgumentImpl; import railo.runtime.type.util.ArraySupport; import railo.runtime.type.util.ArrayUtil; import railo.runtime.type.util.ComponentUtil; >>>>>>> import railo.runtime.type.util.CollectionUtil; import railo.runtime.type.scope.Argument; import railo.runtime.type.scope.ArgumentImpl; import railo.runtime.type.util.ArraySupport; import railo.runtime.type.util.ArrayUtil; import railo.runtime.type.util.ComponentUtil;
<<<<<<< "source file ["+src+"] does not exist"); try { IOUtil.copy(src, trg); } catch (IOException e) { throw Caster.toPageException(e); } ======= "source file ["+src+"] does not exists"); FileTag.actionCopy(pc, pc.getConfig().getSecurityManager(), src, Caster.toString(oDst), FileTag.NAMECONFLICT_UNDEFINED, null, null, -1, null); >>>>>>> "source file ["+src+"] does not exist"); FileTag.actionCopy(pc, pc.getConfig().getSecurityManager(), src, Caster.toString(oDst), FileTag.NAMECONFLICT_UNDEFINED, null, null, -1, null);
<<<<<<< * Write part-of-speech information. * * Default: {@code true} ======= * Use the {@link String#intern()} method on tags. This is usually a good idea to avoid * spamming the heap with thousands of strings representing only a few different tags. */ public static final String PARAM_INTERN_TAGS = ComponentParameters.PARAM_INTERN_TAGS; @ConfigurationParameter(name = PARAM_INTERN_TAGS, mandatory = false, defaultValue = "true") private boolean internTags; /** * Read part-of-speech information. >>>>>>> * Read part-of-speech information.
<<<<<<< public static final String PARAM_WRITE_COVERED_TEXT = WRITE + COVERED_TEXT; ======= public static final String PARAM_WRITE_SEMANTIC_PREDICATE = WRITE + SEMANTIC_PREDICATE; >>>>>>> public static final String PARAM_WRITE_COVERED_TEXT = WRITE + COVERED_TEXT; public static final String PARAM_WRITE_SEMANTIC_PREDICATE = WRITE + SEMANTIC_PREDICATE;
<<<<<<< import static org.dkpro.core.testing.IOTestRunner.testOneWay; ======= import static de.tudarmstadt.ukp.dkpro.core.testing.IOTestRunner.testOneWay; import static org.apache.uima.fit.factory.AnalysisEngineFactory.createEngineDescription; import static org.apache.uima.fit.factory.CollectionReaderFactory.createReaderDescription; >>>>>>> import static org.apache.uima.fit.factory.AnalysisEngineFactory.createEngineDescription; import static org.apache.uima.fit.factory.CollectionReaderFactory.createReaderDescription; import static org.dkpro.core.testing.IOTestRunner.testOneWay;
<<<<<<< ======= /** * Use the {@link String#intern()} method on tags. This is usually a good idea to avoid * spaming the heap with thousands of strings representing only a few different tags. */ public static final String PARAM_INTERN_TAGS = ComponentParameters.PARAM_INTERN_TAGS; @ConfigurationParameter(name = PARAM_INTERN_TAGS, mandatory = false, defaultValue = "true") private boolean internTags; /** * Whether to remove traces from the parse tree. */ >>>>>>> /** * Whether to remove traces from the parse tree. */
<<<<<<< import org.commonmark.html.renderer.HtmlNodeRenderer; import org.commonmark.html.renderer.HtmlNodeRendererContext; import org.commonmark.html.renderer.HtmlNodeRendererFactory; ======= import org.commonmark.html.attribute.AttributeProvider; import org.commonmark.html.attribute.AttributeProviderContext; import org.commonmark.html.attribute.AttributeProviderFactory; import org.commonmark.html.renderer.CoreNodeRenderer; import org.commonmark.html.renderer.NodeRenderer; import org.commonmark.html.renderer.NodeRendererContext; import org.commonmark.html.renderer.NodeRendererFactory; >>>>>>> import org.commonmark.html.attribute.AttributeProvider; import org.commonmark.html.attribute.AttributeProviderContext; import org.commonmark.html.attribute.AttributeProviderFactory; import org.commonmark.html.renderer.HtmlNodeRenderer; import org.commonmark.html.renderer.HtmlNodeRendererContext; import org.commonmark.html.renderer.HtmlNodeRendererFactory; <<<<<<< private final List<AttributeProvider> attributeProviders; private final List<NodeRendererFactory<HtmlNodeRendererContext>> nodeRendererFactories; ======= private final List<AttributeProviderFactory> attributeProviderFactories; private final List<NodeRendererFactory> nodeRendererFactories; >>>>>>> private final List<AttributeProviderFactory> attributeProviderFactories; private final List<NodeRendererFactory<HtmlNodeRendererContext>> nodeRendererFactories; <<<<<<< this.nodeRendererFactories.add(new HtmlNodeRendererFactory() { @Override public NodeRenderer create(HtmlNodeRendererContext context) { return new HtmlNodeRenderer(context); ======= this.nodeRendererFactories.add(new NodeRendererFactory() { public NodeRenderer create(NodeRendererContext context) { return new CoreNodeRenderer(context); >>>>>>> this.nodeRendererFactories.add(new HtmlNodeRendererFactory() { @Override public NodeRenderer create(HtmlNodeRendererContext context) { return new HtmlNodeRenderer(context); <<<<<<< private List<AttributeProvider> attributeProviders = new ArrayList<>(); private List<NodeRendererFactory<HtmlNodeRendererContext>> nodeRendererFactories = new ArrayList<>(); ======= private List<AttributeProviderFactory> attributeProviderFactories = new ArrayList<>(); private List<NodeRendererFactory> nodeRendererFactories = new ArrayList<>(); >>>>>>> private List<AttributeProviderFactory> attributeProviderFactories = new ArrayList<>(); private List<NodeRendererFactory<HtmlNodeRendererContext>> nodeRendererFactories = new ArrayList<>(); <<<<<<< private class RendererContext extends HtmlNodeRendererContext { ======= private class MainNodeRenderer implements NodeRendererContext, AttributeProviderContext { >>>>>>> private class RendererContext extends HtmlNodeRendererContext implements AttributeProviderContext { <<<<<<< ======= private final List<AttributeProvider> attributeProviders; private final Map<Class<? extends Node>, NodeRenderer> renderers; >>>>>>> private final List<AttributeProvider> attributeProviders; <<<<<<< List<NodeRenderer> renderers = new ArrayList<>(nodeRendererFactories.size()); for (NodeRendererFactory<HtmlNodeRendererContext> nodeRendererFactory : nodeRendererFactories) { renderers.add(nodeRendererFactory.create(this)); ======= attributeProviders = new ArrayList<>(attributeProviderFactories.size()); for (AttributeProviderFactory attributeProviderFactory : attributeProviderFactories) { attributeProviders.add(attributeProviderFactory.create(this)); } renderers = new HashMap<>(32); // The first node renderer for a node type "wins". for (int i = nodeRendererFactories.size() - 1; i >= 0; i--) { NodeRendererFactory nodeRendererFactory = nodeRendererFactories.get(i); NodeRenderer nodeRenderer = nodeRendererFactory.create(this); for (Class<? extends Node> nodeType : nodeRenderer.getNodeTypes()) { // Overwrite existing renderer renderers.put(nodeType, nodeRenderer); } >>>>>>> attributeProviders = new ArrayList<>(attributeProviderFactories.size()); for (AttributeProviderFactory attributeProviderFactory : attributeProviderFactories) { attributeProviders.add(attributeProviderFactory.create(this)); } List<NodeRenderer> renderers = new ArrayList<>(nodeRendererFactories.size()); for (NodeRendererFactory<HtmlNodeRendererContext> nodeRendererFactory : nodeRendererFactories) { renderers.add(nodeRendererFactory.create(this));
<<<<<<< public final static String LOCAL_DB_FIELD = "local"; public final static String ADMIN_DB_FIELD = "admin"; ======= public final static String DB_LOCAL = "local"; public final static String DB_ADMIN = "admin"; public final static String DB_CONFIG = "config"; >>>>>>> public final static String LOCAL_DB_FIELD = "local"; public final static String ADMIN_DB_FIELD = "admin"; public final static String DB_LOCAL = "local"; public final static String DB_ADMIN = "admin"; public final static String DB_CONFIG = "config";
<<<<<<< enum Taxonomy { BASIC, POOLED, PACKED; } ======= /** * Contains all generated component types, newly generated component types * will be stored here. */ private static final IdentityHashMap<Class<? extends Component>, ComponentType> componentTypes = new IdentityHashMap<Class<? extends Component>, ComponentType>(); >>>>>>> enum Taxonomy { BASIC, POOLED, PACKED; } /** * Contains all generated component types, newly generated component types * will be stored here. */ private static final IdentityHashMap<Class<? extends Component>, ComponentType> componentTypes = new IdentityHashMap<Class<? extends Component>, ComponentType>(); <<<<<<< protected Taxonomy getTaxonomy() { return taxonomy; } protected static Taxonomy getTaxonomy(int index) { ComponentType type = types.get(index); return type != null ? type.getTaxonomy() : Taxonomy.BASIC; } public boolean isPackedComponent() { return taxonomy == Taxonomy.PACKED; } protected static boolean isPackedComponent(int index) { ComponentType type = types.get(index); return type != null ? type.isPackedComponent() : false; } protected Class<? extends Component> getType() { return type; } /** * Contains all generated component types, newly generated component types * will be stored here. */ private static final HashMap<Class<? extends Component>, ComponentType> componentTypes = new HashMap<Class<? extends Component>, ComponentType>(); ======= >>>>>>> protected Taxonomy getTaxonomy() { return taxonomy; } protected static Taxonomy getTaxonomy(int index) { ComponentType type = types.get(index); return type != null ? type.getTaxonomy() : Taxonomy.BASIC; } public boolean isPackedComponent() { return taxonomy == Taxonomy.PACKED; } protected static boolean isPackedComponent(int index) { ComponentType type = types.get(index); return type != null ? type.isPackedComponent() : false; } protected Class<? extends Component> getType() { return type; }
<<<<<<< Configuration coreDefaults = YamlConfiguration.loadConfiguration(this.getClass().getResourceAsStream("/defaults/config.yml")); this.multiverseConfig.setDefaults(coreDefaults); this.multiverseConfig.options().copyDefaults(false); this.multiverseConfig.options().copyHeader(true); ======= >>>>>>> Configuration coreDefaults = YamlConfiguration.loadConfiguration(this.getClass().getResourceAsStream("/defaults/config.yml")); this.multiverseConfig.setDefaults(coreDefaults); this.multiverseConfig.options().copyDefaults(false); this.multiverseConfig.options().copyHeader(true); <<<<<<< ======= * Thes are the MV config 2.0-2.2 values, * they should be migrated to the new format. */ private void migrate22Values() { if (this.multiverseConfig.isSet("worldnameprefix")) { this.log(Level.INFO, "Migrating 'worldnameprefix'..."); this.config.setPrefixChat(this.multiverseConfig.getBoolean("worldnameprefix")); this.multiverseConfig.set("worldnameprefix", null); } if (this.multiverseConfig.isSet("firstspawnworld")) { this.log(Level.INFO, "Migrating 'firstspawnworld'..."); this.config.setFirstSpawnWorld(this.multiverseConfig.getString("firstspawnworld")); this.multiverseConfig.set("firstspawnworld", null); } if (this.multiverseConfig.isSet("enforceaccess")) { this.log(Level.INFO, "Migrating 'enforceaccess'..."); this.config.setEnforceAccess(this.multiverseConfig.getBoolean("enforceaccess")); this.multiverseConfig.set("enforceaccess", null); } if (this.multiverseConfig.isSet("displaypermerrors")) { this.log(Level.INFO, "Migrating 'displaypermerrors'..."); this.config.setDisplayPermErrors(this.multiverseConfig.getBoolean("displaypermerrors")); this.multiverseConfig.set("displaypermerrors", null); } if (this.multiverseConfig.isSet("teleportintercept")) { this.log(Level.INFO, "Migrating 'teleportintercept'..."); this.config.setTeleportIntercept(this.multiverseConfig.getBoolean("teleportintercept")); this.multiverseConfig.set("teleportintercept", null); } if (this.multiverseConfig.isSet("firstspawnoverride")) { this.log(Level.INFO, "Migrating 'firstspawnoverride'..."); this.config.setFirstSpawnOverride(this.multiverseConfig.getBoolean("firstspawnoverride")); this.multiverseConfig.set("firstspawnoverride", null); } if (this.multiverseConfig.isSet("messagecooldown")) { this.log(Level.INFO, "Migrating 'messagecooldown'..."); this.config.setMessageCooldown(this.multiverseConfig.getInt("messagecooldown")); this.multiverseConfig.set("messagecooldown", null); } if (this.multiverseConfig.isSet("debug")) { this.log(Level.INFO, "Migrating 'debug'..."); this.config.setGlobalDebug(this.multiverseConfig.getInt("debug")); this.multiverseConfig.set("debug", null); } if (this.multiverseConfig.isSet("version")) { this.log(Level.INFO, "Migrating 'version'..."); this.multiverseConfig.set("version", null); } } /** * Safely return a world name. * (The tests call this with no worlds loaded) * * @return The default world name. */ private String getDefaultWorldName() { if (this.getServer().getWorlds().size() > 0) { return this.getServer().getWorlds().get(0).getName(); } return ""; } /** >>>>>>> * Thes are the MV config 2.0-2.2 values, * they should be migrated to the new format. */ private void migrate22Values() { if (this.multiverseConfig.isSet("worldnameprefix")) { this.log(Level.INFO, "Migrating 'worldnameprefix'..."); this.config.setPrefixChat(this.multiverseConfig.getBoolean("worldnameprefix")); this.multiverseConfig.set("worldnameprefix", null); } if (this.multiverseConfig.isSet("firstspawnworld")) { this.log(Level.INFO, "Migrating 'firstspawnworld'..."); this.config.setFirstSpawnWorld(this.multiverseConfig.getString("firstspawnworld")); this.multiverseConfig.set("firstspawnworld", null); } if (this.multiverseConfig.isSet("enforceaccess")) { this.log(Level.INFO, "Migrating 'enforceaccess'..."); this.config.setEnforceAccess(this.multiverseConfig.getBoolean("enforceaccess")); this.multiverseConfig.set("enforceaccess", null); } if (this.multiverseConfig.isSet("displaypermerrors")) { this.log(Level.INFO, "Migrating 'displaypermerrors'..."); this.config.setDisplayPermErrors(this.multiverseConfig.getBoolean("displaypermerrors")); this.multiverseConfig.set("displaypermerrors", null); } if (this.multiverseConfig.isSet("teleportintercept")) { this.log(Level.INFO, "Migrating 'teleportintercept'..."); this.config.setTeleportIntercept(this.multiverseConfig.getBoolean("teleportintercept")); this.multiverseConfig.set("teleportintercept", null); } if (this.multiverseConfig.isSet("firstspawnoverride")) { this.log(Level.INFO, "Migrating 'firstspawnoverride'..."); this.config.setFirstSpawnOverride(this.multiverseConfig.getBoolean("firstspawnoverride")); this.multiverseConfig.set("firstspawnoverride", null); } if (this.multiverseConfig.isSet("messagecooldown")) { this.log(Level.INFO, "Migrating 'messagecooldown'..."); this.config.setMessageCooldown(this.multiverseConfig.getInt("messagecooldown")); this.multiverseConfig.set("messagecooldown", null); } if (this.multiverseConfig.isSet("debug")) { this.log(Level.INFO, "Migrating 'debug'..."); this.config.setGlobalDebug(this.multiverseConfig.getInt("debug")); this.multiverseConfig.set("debug", null); } if (this.multiverseConfig.isSet("version")) { this.log(Level.INFO, "Migrating 'version'..."); this.multiverseConfig.set("version", null); } } /**
<<<<<<< unloadWorld(name); this.plugin.log(Level.INFO, "World " + name + " was removed from config.yml"); ======= removeWorldFromList(name); this.plugin.log(Level.INFO, "World '" + name + "' was removed from config.yml"); >>>>>>> unloadWorld(name); this.plugin.log(Level.INFO, "World '" + name + "' was removed from config.yml"); <<<<<<< this.plugin.log(Level.INFO, "World " + name + " was unloaded from memory."); this.unloadWorldFromBukkit(name, true); ======= this.plugin.log(Level.INFO, "World '" + name + "' was unloaded from memory."); this.unloadWorld(name, true); >>>>>>> this.plugin.log(Level.INFO, "World '" + name + "' was unloaded from memory."); this.unloadWorldFromBukkit(name, true);
<<<<<<< List<AbstractProject> downstreams = ProjectUtil.getDownstreamProjects(project); List<String> downStreamTasks = new ArrayList<String>(); for (AbstractProject downstreamProject : downstreams) { downStreamTasks.add(downstreamProject.getRelativeNameFrom(Jenkins.getInstance())); } return new Task(project.getRelativeNameFrom(Jenkins.getInstance()), taskName, null, status, project.getUrl(), false, null, downStreamTasks); ======= return new Task(project.getRelativeNameFrom(Jenkins.getInstance()), taskName, null, status, Util.fixNull(Jenkins.getInstance().getRootUrl()) + project.getUrl(), false, null); >>>>>>> List<AbstractProject> downstreams = ProjectUtil.getDownstreamProjects(project); List<String> downStreamTasks = new ArrayList<String>(); for (AbstractProject downstreamProject : downstreams) { downStreamTasks.add(downstreamProject.getRelativeNameFrom(Jenkins.getInstance())); } return new Task(project.getRelativeNameFrom(Jenkins.getInstance()), taskName, null, status, Util.fixNull(Jenkins.getInstance().getRootUrl()) + project.getUrl(), false, null, downStreamTasks); <<<<<<< String link = status.isIdle() ? task.getLink() : currentBuild.getUrl(); tasks.add(new Task(task.getId(), task.getName(), String.valueOf(currentBuild.getNumber()), status, link, task.isManual(), getTestResult(currentBuild), task.getDownstreamTasks())); ======= String link = status.isIdle() ? task.getLink() : Util.fixNull(Jenkins.getInstance().getRootUrl()) + currentBuild.getUrl(); tasks.add(new Task(task.getId(), task.getName(), String.valueOf(currentBuild.getNumber()), status, link, task.isManual(), getTestResult(currentBuild))); >>>>>>> String link = status.isIdle() ? task.getLink() : Util.fixNull(Jenkins.getInstance().getRootUrl()) + currentBuild.getUrl(); tasks.add(new Task(task.getId(), task.getName(), String.valueOf(currentBuild.getNumber()), status, link, task.isManual(), getTestResult(currentBuild), task.getDownstreamTasks())); <<<<<<< stages.add(new Stage(stage.getName(), tasks, stage.getDownstreamStages(), stage.getTaskConnections(), version, stage.getRow(), stage.getColumn())); ======= stages.add(new Stage(stage.getName(), tasks, version)); >>>>>>> stages.add(new Stage(stage.getName(), tasks, stage.getDownstreamStages(), stage.getTaskConnections(), version, stage.getRow(), stage.getColumn()));
<<<<<<< Setup.setZssLocale(Locale.UK); Assert.assertEquals("dd-mm-yyyy", r.getCellDataFormat()); ======= Setup.setZssContentLocale(Locale.UK); Assert.assertEquals("yyyy/m/d", r.getCellStyle().getDataFormat()); >>>>>>> Setup.setZssLocale(Locale.UK); Assert.assertEquals("yyyy/m/d", r.getCellStyle().getDataFormat());
<<<<<<< } else if(o == null) { return o; } else if (o instanceof Tuple2) { Tuple2 t = (Tuple2)o; logger.info("Tupple2 - " + t.toString()); Object er = null; Object o1 = javaToJs(t._1(),engine); Object o2 = javaToJs(t._2(), engine); logger.debug("o1 = " + o1); try { Invocable invocable = (Invocable) engine; Object params[] = {o1, o2}; er = invocable.invokeFunction("convertJavaTuple2",params); } catch (ScriptException | NoSuchMethodException e) { logger.error(" Tuple2 convertion " + e); } return er; } else if (o instanceof IteratorWrapper) { ======= } else if ((o instanceof Product) && (o.getClass().getName().indexOf("scala.Tuple") > -1)) { Product t = (Product)o; logger.info("Tuple3 - " + t.toString()); Invocable invocable = (Invocable) engine; Object params[] = {"Tuple", o}; try { Object parm = invocable.invokeFunction("createJavaWrapperObject", params); logger.debug("Tuple3= " + parm.toString()); return parm; } catch (ScriptException | NoSuchMethodException e) { logger.error(" Tuple conversion " + e); } return null; } else if (o instanceof IteratorWrapper) { >>>>>>> } else if(o == null) { return o; } else if ((o instanceof Product) && (o.getClass().getName().indexOf("scala.Tuple") > -1)) { Product t = (Product)o; logger.info("Tuple3 - " + t.toString()); Invocable invocable = (Invocable) engine; Object params[] = {"Tuple", o}; try { Object parm = invocable.invokeFunction("createJavaWrapperObject", params); logger.debug("Tuple3= " + parm.toString()); return parm; } catch (ScriptException | NoSuchMethodException e) { logger.error(" Tuple conversion " + e); } return null; } else if (o instanceof IteratorWrapper) {
<<<<<<< @Override public String toJSON() { return "{\"0\":" + Utils.JsonStringify(_1) + ",\"1\":" + Utils.JsonStringify(_2) + ",\"length\":2}" ; } ======= public String getClassName() {return "Tuple2";} public boolean checkInstance(Object other){ return other instanceof Tuple2;} >>>>>>> public String getClassName() {return "Tuple2";} public boolean checkInstance(Object other){ return other instanceof Tuple2;} @Override public String toJSON() { return "{\"0\":" + Utils.JsonStringify(_1) + ",\"1\":" + Utils.JsonStringify(_2) + ",\"length\":2}" ; }
<<<<<<< engine.eval("load('" + getResourceAsURLStirng("/mllib/recommendation.js") + "');"); ======= //ml engine.eval("load('" + getResourceAsURLStirng("/ml/Word2Vec.js") + "');"); >>>>>>> engine.eval("load('" + getResourceAsURLStirng("/mllib/recommendation.js") + "');"); //ml engine.eval("load('" + getResourceAsURLStirng("/ml/Word2Vec.js") + "');");
<<<<<<< sIni.assumeAliases(r, o.getOrigin()); } catch (ContradictionException | FrozenStateException e) { ======= sIni.assumeAliases(r, heapPosition); } catch (ContradictionException | InvalidInputException e) { >>>>>>> sIni.assumeAliases(r, o.getOrigin()); } catch (ContradictionException | InvalidInputException e) {
<<<<<<< private final String originString; private final int hashCode; ======= private final String asOriginString; >>>>>>> private final String asOriginString; private final int hashCode; <<<<<<< this.originString = getContainer().asOriginString() + "[" + (this.index.isSymbolic() ? ((Symbolic) this.index).asOriginString() : this.index.toString()) + "]"; //calculates hashCode final int prime = 677; int result = 1; result = prime * result + getContainer().hashCode(); result = prime * result + index.hashCode(); this.hashCode = result; ======= this.asOriginString = getContainer().asOriginString() + "[" + (this.index.isSymbolic() ? ((Symbolic) this.index).asOriginString() : this.index.toString()) + "]"; >>>>>>> this.asOriginString = getContainer().asOriginString() + "[" + (this.index.isSymbolic() ? ((Symbolic) this.index).asOriginString() : this.index.toString()) + "]"; //calculates hashCode final int prime = 677; int result = 1; result = prime * result + getContainer().hashCode(); result = prime * result + index.hashCode(); this.hashCode = result; <<<<<<< return this.originString; ======= return this.asOriginString; >>>>>>> return this.asOriginString;
<<<<<<< import java.util.ArrayList; import java.util.List; import net.minecraft.entity.player.EntityPlayer; ======= import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; >>>>>>> import java.util.ArrayList; import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; <<<<<<< import net.minecraftforge.common.util.ForgeDirection; ======= import net.minecraft.util.Vec3; >>>>>>> import net.minecraft.util.Vec3; import net.minecraftforge.common.util.ForgeDirection; <<<<<<< import net.quetzi.bluepower.references.Dependencies; import codechicken.lib.raytracer.IndexedCuboid6; import codechicken.lib.vec.Cuboid6; import cpw.mods.fml.common.Optional; ======= >>>>>>> import net.quetzi.bluepower.references.Dependencies; import codechicken.lib.raytracer.IndexedCuboid6; import codechicken.lib.vec.Cuboid6; import cpw.mods.fml.common.Optional; <<<<<<< @Optional.Method(modid = Dependencies.FMP) public static final Cuboid6 getSelectedCuboid(MovingObjectPosition mop, EntityPlayer player, ForgeDirection face, Iterable<IndexedCuboid6> boxes, boolean unused) { List<Cuboid6> cuboids = new ArrayList<Cuboid6>(); for(IndexedCuboid6 c : boxes) cuboids.add(c); return getSelectedCuboid(mop, player, face, cuboids); } @Optional.Method(modid = Dependencies.FMP) public static final Cuboid6 getSelectedCuboid(MovingObjectPosition mop, EntityPlayer player, ForgeDirection face, Iterable<Cuboid6> boxes) { Vector3 hit = new Vector3(mop.hitVec.xCoord - mop.blockX, mop.hitVec.yCoord - mop.blockY, mop.hitVec.zCoord - mop.blockZ); for (Cuboid6 c : boxes) { boolean is = false; if (face == ForgeDirection.UP || face == ForgeDirection.DOWN) { boolean is2 = false; if (face == ForgeDirection.UP) { if (c.max.y == hit.getY()) is2 = true; } else { if (c.min.y == hit.getY()) is2 = true; } if (is2 && hit.getX() >= c.min.x && hit.getX() < c.max.x && hit.getZ() >= c.min.z && hit.getZ() < c.max.z) is = true; } if (face == ForgeDirection.NORTH || face == ForgeDirection.SOUTH) { boolean is2 = false; if (face == ForgeDirection.SOUTH) { if (c.max.z == hit.getZ()) is2 = true; } else { if (c.min.z == hit.getZ()) is2 = true; } if (is2 && hit.getX() >= c.min.x && hit.getX() < c.max.x && hit.getY() >= c.min.y && hit.getY() < c.max.y) is = true; } if (face == ForgeDirection.EAST || face == ForgeDirection.WEST) { boolean is2 = false; if (face == ForgeDirection.EAST) { if (c.max.x == hit.getX()) is2 = true; } else { if (c.min.x == hit.getX()) is2 = true; } if (is2 && hit.getY() >= c.min.y && hit.getY() < c.max.y && hit.getZ() >= c.min.z && hit.getZ() < c.max.z) is = true; } if (is) return c; } return null; } ======= /* * The following methods are from CodeChickenLib, credits to ChickenBones for this. * CodeChickenLib can be found here: http://files.minecraftforge.net/CodeChickenLib/ * */ public static Vec3 getCorrectedHeadVec(EntityPlayer player) { Vec3 v = Vec3.createVectorHelper(player.posX, player.posY, player.posZ); if (player.worldObj.isRemote) { v.yCoord += player.getEyeHeight() - player.getDefaultEyeHeight();//compatibility with eye height changing mods } else { v.yCoord += player.getEyeHeight(); if (player instanceof EntityPlayerMP && player.isSneaking()) v.yCoord -= 0.08; } return v; } public static Vec3 getStartVec(EntityPlayer player) { return getCorrectedHeadVec(player); } public static Vec3 getEndVec(EntityPlayer player) { Vec3 headVec = getCorrectedHeadVec(player); Vec3 lookVec = player.getLook(1.0F); double reach = 4.5; return headVec.addVector(lookVec.xCoord * reach, lookVec.yCoord * reach, lookVec.zCoord * reach); } >>>>>>> @Optional.Method(modid = Dependencies.FMP) public static final Cuboid6 getSelectedCuboid(MovingObjectPosition mop, EntityPlayer player, ForgeDirection face, Iterable<IndexedCuboid6> boxes, boolean unused) { List<Cuboid6> cuboids = new ArrayList<Cuboid6>(); for (IndexedCuboid6 c : boxes) cuboids.add(c); return getSelectedCuboid(mop, player, face, cuboids); } @Optional.Method(modid = Dependencies.FMP) public static final Cuboid6 getSelectedCuboid(MovingObjectPosition mop, EntityPlayer player, ForgeDirection face, Iterable<Cuboid6> boxes) { Vector3 hit = new Vector3(mop.hitVec.xCoord - mop.blockX, mop.hitVec.yCoord - mop.blockY, mop.hitVec.zCoord - mop.blockZ); for (Cuboid6 c : boxes) { boolean is = false; if (face == ForgeDirection.UP || face == ForgeDirection.DOWN) { boolean is2 = false; if (face == ForgeDirection.UP) { if (c.max.y == hit.getY()) is2 = true; } else { if (c.min.y == hit.getY()) is2 = true; } if (is2 && hit.getX() >= c.min.x && hit.getX() < c.max.x && hit.getZ() >= c.min.z && hit.getZ() < c.max.z) is = true; } if (face == ForgeDirection.NORTH || face == ForgeDirection.SOUTH) { boolean is2 = false; if (face == ForgeDirection.SOUTH) { if (c.max.z == hit.getZ()) is2 = true; } else { if (c.min.z == hit.getZ()) is2 = true; } if (is2 && hit.getX() >= c.min.x && hit.getX() < c.max.x && hit.getY() >= c.min.y && hit.getY() < c.max.y) is = true; } if (face == ForgeDirection.EAST || face == ForgeDirection.WEST) { boolean is2 = false; if (face == ForgeDirection.EAST) { if (c.max.x == hit.getX()) is2 = true; } else { if (c.min.x == hit.getX()) is2 = true; } if (is2 && hit.getY() >= c.min.y && hit.getY() < c.max.y && hit.getZ() >= c.min.z && hit.getZ() < c.max.z) is = true; } if (is) return c; } return null; } /* * The following methods are from CodeChickenLib, credits to ChickenBones for this. CodeChickenLib can be found here: * http://files.minecraftforge.net/CodeChickenLib/ */ public static Vec3 getCorrectedHeadVec(EntityPlayer player) { Vec3 v = Vec3.createVectorHelper(player.posX, player.posY, player.posZ); if (player.worldObj.isRemote) { v.yCoord += player.getEyeHeight() - player.getDefaultEyeHeight();// compatibility with eye height changing mods } else { v.yCoord += player.getEyeHeight(); if (player instanceof EntityPlayerMP && player.isSneaking()) v.yCoord -= 0.08; } return v; } public static Vec3 getStartVec(EntityPlayer player) { return getCorrectedHeadVec(player); } public static Vec3 getEndVec(EntityPlayer player) { Vec3 headVec = getCorrectedHeadVec(player); Vec3 lookVec = player.getLook(1.0F); double reach = 4.5; return headVec.addVector(lookVec.xCoord * reach, lookVec.yCoord * reach, lookVec.zCoord * reach); }
<<<<<<< import uk.co.qmunity.lib.client.gui.widget.BaseWidget; import uk.co.qmunity.lib.client.gui.widget.IGuiWidget; ======= import codechicken.nei.VisiblityData; import codechicken.nei.api.INEIGuiHandler; import codechicken.nei.api.TaggedInventoryArea; >>>>>>> import uk.co.qmunity.lib.client.gui.widget.BaseWidget; import uk.co.qmunity.lib.client.gui.widget.GuiAnimatedStat; import uk.co.qmunity.lib.client.gui.widget.IGuiAnimatedStat; import uk.co.qmunity.lib.client.gui.widget.IGuiWidget; import uk.co.qmunity.lib.client.gui.widget.IWidgetListener; import codechicken.nei.VisiblityData; import codechicken.nei.api.INEIGuiHandler; import codechicken.nei.api.TaggedInventoryArea; <<<<<<< ======= import com.bluepowermod.client.gui.widget.WidgetTabItemLister; import com.bluepowermod.tileentities.TileMachineBase; import com.bluepowermod.util.Refs; import com.qmunity.lib.client.gui.widget.BaseWidget; import com.qmunity.lib.client.gui.widget.GuiAnimatedStat; import com.qmunity.lib.client.gui.widget.IGuiAnimatedStat; import com.qmunity.lib.client.gui.widget.IGuiWidget; import com.qmunity.lib.client.gui.widget.IWidgetListener; import com.qmunity.lib.util.Dependencies; import cpw.mods.fml.common.Optional; >>>>>>> import com.bluepowermod.client.gui.widget.WidgetTabItemLister; import com.bluepowermod.tile.TileMachineBase; import com.bluepowermod.util.Dependencies; import com.bluepowermod.util.Refs; import cpw.mods.fml.common.Optional; <<<<<<< public class GuiBase extends GuiContainer implements uk.co.qmunity.lib.client.gui.widget.IWidgetListener { protected static final int COLOR_TEXT = 4210752; private final List<IGuiWidget> widgets = new ArrayList<IGuiWidget>(); ======= public class GuiBase extends GuiContainer implements IWidgetListener, INEIGuiHandler { protected static final int COLOR_TEXT = 4210752; private final List<IGuiWidget> widgets = new ArrayList<IGuiWidget>(); >>>>>>> public class GuiBase extends GuiContainer implements IWidgetListener, INEIGuiHandler { protected static final int COLOR_TEXT = 4210752; private final List<IGuiWidget> widgets = new ArrayList<IGuiWidget>(); <<<<<<< private IInventory inventory; ======= private IInventory inventory; private IGuiAnimatedStat lastLeftStat, lastRightStat; >>>>>>> private IInventory inventory; private IGuiAnimatedStat lastLeftStat, lastRightStat; <<<<<<< ======= @Override public void initGui() { super.initGui(); lastLeftStat = lastRightStat = null; if (inventory instanceof TileMachineBase) { WidgetTabItemLister backlogTab = new WidgetTabItemLister(this, "gui.tab.stuffed", Refs.MODID + ":textures/gui/widgets/gui_stuffed.png", guiLeft + xSize, guiTop + 5, 0xFFc13d40, null, false); lastRightStat = backlogTab; backlogTab.setItems(((TileMachineBase) inventory).getBacklog()); addWidget(backlogTab); } String unlocalizedInfo = inventory.getInventoryName() + ".info"; String localizedInfo = I18n.format(unlocalizedInfo); if (!unlocalizedInfo.equals(localizedInfo)) { addAnimatedStat("gui.tab.info", Refs.MODID + ":textures/gui/widgets/gui_info.png", 0xFF8888FF, isInfoStatLeftSided()).setText( unlocalizedInfo); } } protected boolean isInfoStatLeftSided() { return true; } protected GuiAnimatedStat addAnimatedStat(String title, ItemStack icon, int color, boolean leftSided) { GuiAnimatedStat stat = new GuiAnimatedStat(this, title, icon, guiLeft + (leftSided ? 0 : xSize), leftSided && lastLeftStat != null || !leftSided && lastRightStat != null ? 3 : guiTop + 5, color, leftSided ? lastLeftStat : lastRightStat, leftSided); addWidget(stat); if (leftSided) { lastLeftStat = stat; } else { lastRightStat = stat; } return stat; } protected GuiAnimatedStat addAnimatedStat(String title, String icon, int color, boolean leftSided) { GuiAnimatedStat stat = new GuiAnimatedStat(this, title, icon, guiLeft + (leftSided ? 0 : xSize), leftSided && lastLeftStat != null || !leftSided && lastRightStat != null ? 3 : guiTop + 5, color, leftSided ? lastLeftStat : lastRightStat, leftSided); addWidget(stat); if (leftSided) { lastLeftStat = stat; } else { lastRightStat = stat; } return stat; } >>>>>>> @Override public void initGui() { super.initGui(); lastLeftStat = lastRightStat = null; if (inventory instanceof TileMachineBase) { WidgetTabItemLister backlogTab = new WidgetTabItemLister(this, "gui.tab.stuffed", Refs.MODID + ":textures/gui/widgets/gui_stuffed.png", guiLeft + xSize, guiTop + 5, 0xFFc13d40, null, false); lastRightStat = backlogTab; backlogTab.setItems(((TileMachineBase) inventory).getBacklog()); addWidget(backlogTab); } String unlocalizedInfo = inventory.getInventoryName() + ".info"; String localizedInfo = I18n.format(unlocalizedInfo); if (!unlocalizedInfo.equals(localizedInfo)) { addAnimatedStat("gui.tab.info", Refs.MODID + ":textures/gui/widgets/gui_info.png", 0xFF8888FF, isInfoStatLeftSided()).setText( unlocalizedInfo); } } protected boolean isInfoStatLeftSided() { return true; } protected GuiAnimatedStat addAnimatedStat(String title, ItemStack icon, int color, boolean leftSided) { GuiAnimatedStat stat = new GuiAnimatedStat(this, title, icon, guiLeft + (leftSided ? 0 : xSize), leftSided && lastLeftStat != null || !leftSided && lastRightStat != null ? 3 : guiTop + 5, color, leftSided ? lastLeftStat : lastRightStat, leftSided); addWidget(stat); if (leftSided) { lastLeftStat = stat; } else { lastRightStat = stat; } return stat; } protected GuiAnimatedStat addAnimatedStat(String title, String icon, int color, boolean leftSided) { GuiAnimatedStat stat = new GuiAnimatedStat(this, title, icon, guiLeft + (leftSided ? 0 : xSize), leftSided && lastLeftStat != null || !leftSided && lastRightStat != null ? 3 : guiTop + 5, color, leftSided ? lastLeftStat : lastRightStat, leftSided); addWidget(stat); if (leftSided) { lastLeftStat = stat; } else { lastRightStat = stat; } return stat; } <<<<<<< ======= if (widget instanceof GuiAnimatedStat && ((GuiAnimatedStat) widget).isClicked()) { for (IGuiWidget w : widgets) { if (w != widget && w instanceof GuiAnimatedStat && ((GuiAnimatedStat) w).isLeftSided() == ((GuiAnimatedStat) widget).isLeftSided()) ((GuiAnimatedStat) w).closeWindow(); } } } @Override public void updateScreen() { super.updateScreen(); for (IGuiWidget widget : widgets) widget.update(); >>>>>>> if (widget instanceof GuiAnimatedStat && ((GuiAnimatedStat) widget).isClicked()) { for (IGuiWidget w : widgets) { if (w != widget && w instanceof GuiAnimatedStat && ((GuiAnimatedStat) w).isLeftSided() == ((GuiAnimatedStat) widget).isLeftSided()) ((GuiAnimatedStat) w).closeWindow(); } } } @Override public void updateScreen() { super.updateScreen(); for (IGuiWidget widget : widgets) widget.update();
<<<<<<< import net.quetzi.bluepower.blocks.BlockDiskDrive; import net.quetzi.bluepower.blocks.BlockIOExpander; ======= import net.quetzi.bluepower.blocks.BlockEngine; >>>>>>> import net.quetzi.bluepower.blocks.BlockDiskDrive; import net.quetzi.bluepower.blocks.BlockEngine; import net.quetzi.bluepower.blocks.BlockIOExpander; <<<<<<< ======= public static Block engine; >>>>>>> public static Block engine; <<<<<<< project_table = new BlockProjectTable(); transposer = new BlockTransposer(); cpu = new BlockCPU(); monitor = new BlockMonitor(); disk_drive = new BlockDiskDrive(); io_expander = new BlockIOExpander(); ======= engine = new BlockEngine(); >>>>>>> project_table = new BlockProjectTable(); transposer = new BlockTransposer(); cpu = new BlockCPU(); monitor = new BlockMonitor(); disk_drive = new BlockDiskDrive(); io_expander = new BlockIOExpander(); engine = new BlockEngine(); <<<<<<< GameRegistry.registerBlock(project_table, Refs.PROJECTTABLE_NAME); GameRegistry.registerBlock(transposer, Refs.TRANSPOSER_NAME); GameRegistry.registerBlock(cpu, Refs.BLOCKCPU_NAME); GameRegistry.registerBlock(monitor, Refs.BLOCKMONITOR_NAME); GameRegistry.registerBlock(disk_drive, Refs.BLOCKDISKDRIVE_NAME); GameRegistry.registerBlock(io_expander, Refs.BLOCKIOEXPANDER_NAME); ======= GameRegistry.registerBlock(engine, Refs.ENGINE_NAME); >>>>>>> GameRegistry.registerBlock(project_table, Refs.PROJECTTABLE_NAME); GameRegistry.registerBlock(transposer, Refs.TRANSPOSER_NAME); GameRegistry.registerBlock(cpu, Refs.BLOCKCPU_NAME); GameRegistry.registerBlock(monitor, Refs.BLOCKMONITOR_NAME); GameRegistry.registerBlock(disk_drive, Refs.BLOCKDISKDRIVE_NAME); GameRegistry.registerBlock(io_expander, Refs.BLOCKIOEXPANDER_NAME); GameRegistry.registerBlock(engine, Refs.ENGINE_NAME);
<<<<<<< import com.bluepowermod.blocks.BPBlockMultipart; ======= import com.bluepowermod.blocks.BlockContainerBase; >>>>>>> import com.bluepowermod.blocks.BPBlockMultipart; import com.bluepowermod.blocks.BlockContainerBase; <<<<<<< public static Block basalt; public static Block marble; public static Block basalt_cobble; public static Block basalt_brick; public static Block marble_brick; public static Block cracked_basalt; public static Block basaltbrick_cracked; public static Block basalt_brick_small; public static Block marble_brick_small; public static Block fancy_basalt; public static Block fancy_marble; public static Block marble_tile; public static Block basalt_tile; public static Block marble_paver; public static Block basalt_paver; public static Block nikolite_ore; public static Block ruby_ore; public static Block sapphire_ore; public static Block amethyst_ore; public static Block copper_ore; public static Block silver_ore; public static Block zinc_ore; public static Block tungsten_ore; public static Block ruby_block; public static Block sapphire_block; public static Block amethyst_block; public static Block nikolite_block; public static Block copper_block; public static Block silver_block; public static Block zinc_block; public static Block tungsten_block; public static Block flax_crop; public static Block indigo_flower; public static Block alloy_furnace; public static Block block_breaker; public static Block igniter; public static Block buffer; public static Block Deployer; public static Block transposer; public static Block sorting_machine; public static Block sortron; public static Block project_table; public static Block ejector; public static Block relay; public static Block filter; public static Block cpu; public static Block monitor; public static Block disk_drive; public static Block io_expander; public static Block multipart; // DO NOT GENERATE OR REMOVE THIS BLOCK! public static Block engine; public static Block kinetic_generator; public static Block windmill; ======= public static Block basalt; public static Block marble; public static Block basalt_cobble; public static Block basalt_brick; public static Block marble_brick; public static Block cracked_basalt; public static Block basaltbrick_cracked; public static Block basalt_brick_small; public static Block marble_brick_small; public static Block fancy_basalt; public static Block fancy_marble; public static Block marble_tile; public static Block basalt_tile; public static Block marble_paver; public static Block basalt_paver; public static Block nikolite_ore; public static Block ruby_ore; public static Block sapphire_ore; public static Block amethyst_ore; public static Block copper_ore; public static Block silver_ore; public static Block zinc_ore; public static Block tungsten_ore; public static Block ruby_block; public static Block sapphire_block; public static Block amethyst_block; public static Block nikolite_block; public static Block copper_block; public static Block silver_block; public static Block zinc_block; public static Block tungsten_block; public static Block flax_crop; public static Block indigo_flower; public static Block alloy_furnace; public static Block block_breaker; public static Block igniter; public static Block buffer; public static Block Deployer; public static Block transposer; public static Block sorting_machine; public static Block sortron; public static Block project_table; public static Block ejector; public static Block relay; public static Block filter; public static Block retriever; public static Block cpu; public static Block monitor; public static Block disk_drive; public static Block io_expander; public static Block multipart; // DO NOT GENERATE OR REMOVE THIS BLOCK! public static Block engine; public static Block kinetic_generator; public static Block windmill; >>>>>>> public static Block basalt; public static Block marble; public static Block basalt_cobble; public static Block basalt_brick; public static Block marble_brick; public static Block cracked_basalt; public static Block basaltbrick_cracked; public static Block basalt_brick_small; public static Block marble_brick_small; public static Block fancy_basalt; public static Block fancy_marble; public static Block marble_tile; public static Block basalt_tile; public static Block marble_paver; public static Block basalt_paver; public static Block nikolite_ore; public static Block ruby_ore; public static Block sapphire_ore; public static Block amethyst_ore; public static Block copper_ore; public static Block silver_ore; public static Block zinc_ore; public static Block tungsten_ore; public static Block ruby_block; public static Block sapphire_block; public static Block amethyst_block; public static Block nikolite_block; public static Block copper_block; public static Block silver_block; public static Block zinc_block; public static Block tungsten_block; public static Block flax_crop; public static Block indigo_flower; public static Block alloy_furnace; public static Block block_breaker; public static Block igniter; public static Block buffer; public static Block Deployer; public static Block transposer; public static Block sorting_machine; public static Block sortron; public static Block project_table; public static Block ejector; public static Block relay; public static Block filter; public static Block retriever; public static Block cpu; public static Block monitor; public static Block disk_drive; public static Block io_expander; public static Block multipart; // DO NOT GENERATE OR REMOVE THIS BLOCK! public static Block engine; public static Block kinetic_generator; public static Block windmill; <<<<<<< transposer = new BlockTransposer(); ejector = new BlockEjector(); relay = new BlockRelay(); filter = new BlockFilter(); ======= transposer = new BlockContainerBase(Material.rock, TileTransposer.class).setBlockName(Refs.TRANSPOSER_NAME); ejector = new BlockContainerTwoSideRender(Material.rock, TileEjector.class).setGuiId(GuiIDs.EJECTOR_ID).setBlockName(Refs.EJECTOR_NAME); relay = new BlockContainerTwoSideRender(Material.rock, TileRelay.class).setGuiId(GuiIDs.RELAY_ID).setBlockName(Refs.RELAY_NAME); filter = new BlockContainerBase(Material.rock, TileFilter.class).setGuiId(GuiIDs.FILTER_ID).setBlockName(Refs.FILTER_NAME); retriever = new BlockContainerBase(Material.rock, TileRetriever.class).setGuiId(GuiIDs.RETRIEVER_ID).setBlockName(Refs.RETRIEVER_NAME); >>>>>>> transposer = new BlockContainerBase(Material.rock, TileTransposer.class).setBlockName(Refs.TRANSPOSER_NAME); ejector = new BlockContainerTwoSideRender(Material.rock, TileEjector.class).setGuiId(GuiIDs.EJECTOR_ID).setBlockName(Refs.EJECTOR_NAME); relay = new BlockContainerTwoSideRender(Material.rock, TileRelay.class).setGuiId(GuiIDs.RELAY_ID).setBlockName(Refs.RELAY_NAME); filter = new BlockContainerBase(Material.rock, TileFilter.class).setGuiId(GuiIDs.FILTER_ID).setBlockName(Refs.FILTER_NAME); retriever = new BlockContainerBase(Material.rock, TileRetriever.class).setGuiId(GuiIDs.RETRIEVER_ID).setBlockName(Refs.RETRIEVER_NAME); <<<<<<< ======= GameRegistry.registerBlock(retriever, Refs.RETRIEVER_NAME); >>>>>>> GameRegistry.registerBlock(retriever, Refs.RETRIEVER_NAME);
<<<<<<< import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraftforge.client.MinecraftForgeClient; ======= >>>>>>> import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraftforge.client.MinecraftForgeClient;
<<<<<<< ======= import net.mabako.steamgifts.fragments.interfaces.ILoadItemsListener; import net.mabako.steamgifts.fragments.interfaces.IScrollToTop; >>>>>>> import net.mabako.steamgifts.fragments.interfaces.ILoadItemsListener; <<<<<<< public abstract class ListFragment<AdapterType extends EndlessAdapter> extends Fragment implements EndlessAdapter.OnLoadListener { private static final String TAG = ListFragment.class.getSimpleName(); ======= public abstract class ListFragment<AdapterType extends EndlessAdapter> extends Fragment implements EndlessAdapter.OnLoadListener, IScrollToTop, ILoadItemsListener { private static final long serialVersionUID = -1489654549912777189L; >>>>>>> public abstract class ListFragment<AdapterType extends EndlessAdapter> extends Fragment implements EndlessAdapter.OnLoadListener, ILoadItemsListener { private static final String TAG = ListFragment.class.getSimpleName();
<<<<<<< ======= } @Override protected boolean isInfoStatLeftSided() { return false; >>>>>>> } @Override protected boolean isInfoStatLeftSided() { return false;
<<<<<<< GameRegistry.registerTileEntity(TileCPU.class, "tileCPU"); GameRegistry.registerTileEntity(TileMonitor.class, "tileMonitor"); GameRegistry.registerTileEntity(TileDiskDrive.class, "tileDiskDrive"); GameRegistry.registerTileEntity(TileIOExpander.class, "tileIOExpander"); ======= GameRegistry.registerTileEntity(TileEngine.class, "tileEngine"); >>>>>>> GameRegistry.registerTileEntity(TileCPU.class, "tileCPU"); GameRegistry.registerTileEntity(TileMonitor.class, "tileMonitor"); GameRegistry.registerTileEntity(TileDiskDrive.class, "tileDiskDrive"); GameRegistry.registerTileEntity(TileIOExpander.class, "tileIOExpander"); GameRegistry.registerTileEntity(TileEngine.class, "tileEngine");
<<<<<<< public static final String TRANSPOSER_NAME = "transposer"; ======= public static final String ENGINE_NAME = "engine"; >>>>>>> public static final String TRANSPOSER_NAME = "transposer"; public static final String ENGINE_NAME = "engine"; <<<<<<< public static final String PROJECTTABLE_NAME = "projecttable"; public static final String BLOCKCPU_NAME = "cpu"; public static final String BLOCKMONITOR_NAME = "monitor"; public static final String BLOCKDISKDRIVE_NAME = "disk_drive"; public static final String BLOCKIOEXPANDER_NAME = "io_expander"; public static final String FLOPPY_DISK = "floppy_disk"; ======= >>>>>>> public static final String PROJECTTABLE_NAME = "projecttable"; public static final String BLOCKCPU_NAME = "cpu"; public static final String BLOCKMONITOR_NAME = "monitor"; public static final String BLOCKDISKDRIVE_NAME = "disk_drive"; public static final String BLOCKIOEXPANDER_NAME = "io_expander"; public static final String FLOPPY_DISK = "floppy_disk";
<<<<<<< private TileEntityCache[] tileCache; public static final int BUFFER_EMPTY_INTERVAL = 10; protected byte animationTicker = -1; protected static final int ANIMATION_TIME = 7; private boolean isAnimating; ======= private TileEntityCache[] tileCache; public static final int BUFFER_EMPTY_INTERVAL = 10; protected byte animationTicker = -1; protected static final int ANIMATION_TIME = 7; private boolean isAnimating; private boolean ejectionScheduled; >>>>>>> private TileEntityCache[] tileCache; public static final int BUFFER_EMPTY_INTERVAL = 10; protected byte animationTicker = -1; protected static final int ANIMATION_TIME = 7; private boolean isAnimating; private boolean ejectionScheduled; <<<<<<< if (!internalItemStackBuffer.isEmpty()) { ======= for (Iterator<TubeStack> iterator = internalItemStackBuffer.iterator(); iterator.hasNext();) { TubeStack tubeStack = iterator.next(); >>>>>>> for (Iterator<TubeStack> iterator = internalItemStackBuffer.iterator(); iterator.hasNext();) { TubeStack tubeStack = iterator.next(); <<<<<<< TubeStack tubeStack = internalItemStackBuffer.get(0); ItemStack returnedStack = IOHelper.insert(getTileCache()[getOutputDirection().ordinal()].getTileEntity(), tubeStack.stack, getFacingDirection(), tubeStack.color, false); ======= ItemStack returnedStack = IOHelper.insert(getTileCache()[getOutputDirection().ordinal()].getTileEntity(), tubeStack.stack, getFacingDirection(), tubeStack.color, false); >>>>>>> ItemStack returnedStack = IOHelper.insert(getTileCache()[getOutputDirection().ordinal()].getTileEntity(), tubeStack.stack, getFacingDirection(), tubeStack.color, false); <<<<<<< if (internalItemStackBuffer.size() == 1) scheduleInjection(); ======= if (internalItemStackBuffer.size() == 1) ejectionScheduled = true; >>>>>>> if (internalItemStackBuffer.size() == 1) ejectionScheduled = true; <<<<<<< public List<TubeStack> getBacklog() { return internalItemStackBuffer; } @SideOnly(Side.CLIENT) public void setBacklog(List<TubeStack> backlog) { internalItemStackBuffer.clear(); internalItemStackBuffer.addAll(backlog); } ======= >>>>>>> public List<TubeStack> getBacklog() { return internalItemStackBuffer; } @SideOnly(Side.CLIENT) public void setBacklog(List<TubeStack> backlog) { internalItemStackBuffer.clear(); internalItemStackBuffer.addAll(backlog); } <<<<<<< return internalItemStackBuffer.isEmpty(); ======= return internalItemStackBuffer.isEmpty();// also say the buffer is empty when a immediate injection is scheduled. >>>>>>> return internalItemStackBuffer.isEmpty();// also say the buffer is empty when a immediate injection is scheduled. <<<<<<< if (from == getFacingDirection() && !isBufferEmpty()) return stack; if (!simulate) this.addItemToOutputBuffer(stack.stack, stack.color); ======= if (from == getFacingDirection() && !isBufferEmpty() && !ejectionScheduled) return stack; if (!simulate) this.addItemToOutputBuffer(stack.stack, stack.color); >>>>>>> if (from == getFacingDirection() && !isBufferEmpty() && !ejectionScheduled) return stack; if (!simulate) this.addItemToOutputBuffer(stack.stack, stack.color);
<<<<<<< ======= protected String getTextureName() { return getType(); } >>>>>>> protected String getTextureName() { return getType(); } <<<<<<< if (getWorld().isRemote && Config.enableGateSounds) getWorld().playSound(getX(), getY(), getZ(), "gui.button.press", 0.3F, 0.5F, false); ======= if (getWorld() != null && getWorld().isRemote && Config.enableGateSounds) getWorld().playSound(getX(), getY(), getZ(), "gui.button.press", 1, 0.5F, false); >>>>>>> if (getWorld().isRemote && Config.enableGateSounds) getWorld().playSound(getX(), getY(), getZ(), "gui.button.press", 0.3F, 0.5F, false); <<<<<<< if (pass != 0) return; GL11.glPushMatrix(); { super.rotateAndTranslateDynamic(loc, pass, frame); /* Top */ renderTop(frame); Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(Refs.MODID + ":textures/blocks/gates/bottom.png")); GL11.glBegin(GL11.GL_QUADS); /* Bottom */ GL11.glNormal3d(0, -1, 0); RenderHelper.addVertexWithTexture(0, 0, 0, 0, 0); RenderHelper.addVertexWithTexture(1, 0, 0, 1, 0); RenderHelper.addVertexWithTexture(1, 0, 1, 1, 1); RenderHelper.addVertexWithTexture(0, 0, 1, 0, 1); GL11.glEnd(); Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(Refs.MODID + ":textures/blocks/gates/side.png")); GL11.glBegin(GL11.GL_QUADS); /* East */ GL11.glNormal3d(1, 0, 0); RenderHelper.addVertexWithTexture(1, 0, 0, 0, 0); RenderHelper.addVertexWithTexture(1, 1D / 8D, 0, 1, 0); RenderHelper.addVertexWithTexture(1, 1D / 8D, 1, 1, 1); RenderHelper.addVertexWithTexture(1, 0, 1, 0, 1); /* West */ GL11.glNormal3d(-1, 0, 0); RenderHelper.addVertexWithTexture(0, 0, 0, 0, 0); RenderHelper.addVertexWithTexture(0, 0, 1, 0, 1); RenderHelper.addVertexWithTexture(0, 1D / 8D, 1, 1, 1); RenderHelper.addVertexWithTexture(0, 1D / 8D, 0, 1, 0); /* North */ GL11.glNormal3d(0, 0, -1); RenderHelper.addVertexWithTexture(0, 0, 0, 0, 0); RenderHelper.addVertexWithTexture(0, 1D / 8D, 0, 1, 0); RenderHelper.addVertexWithTexture(1, 1D / 8D, 0, 1, 1); RenderHelper.addVertexWithTexture(1, 0, 0, 0, 1); /* South */ GL11.glNormal3d(0, 0, 1); RenderHelper.addVertexWithTexture(0, 0, 1, 0, 0); RenderHelper.addVertexWithTexture(1, 0, 1, 0, 1); RenderHelper.addVertexWithTexture(1, 1D / 8D, 1, 1, 1); RenderHelper.addVertexWithTexture(0, 1D / 8D, 1, 1, 0); GL11.glEnd(); ======= if (pass == 0) { GL11.glPushMatrix(); { super.rotateAndTranslateDynamic(loc, pass, frame); /* Top */ renderTop(frame); Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(Refs.MODID + ":textures/blocks/gates/bottom.png")); GL11.glBegin(GL11.GL_QUADS); /* Bottom */ GL11.glNormal3d(0, -1, 0); RenderHelper.addVertexWithTexture(0, 0, 0, 0, 0); RenderHelper.addVertexWithTexture(1, 0, 0, 1, 0); RenderHelper.addVertexWithTexture(1, 0, 1, 1, 1); RenderHelper.addVertexWithTexture(0, 0, 1, 0, 1); GL11.glEnd(); Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(Refs.MODID + ":textures/blocks/gates/side.png")); GL11.glBegin(GL11.GL_QUADS); /* East */ GL11.glNormal3d(1, 0, 0); RenderHelper.addVertexWithTexture(1, 0, 0, 0, 0); RenderHelper.addVertexWithTexture(1, 1D / 8D, 0, 1, 0); RenderHelper.addVertexWithTexture(1, 1D / 8D, 1, 1, 1); RenderHelper.addVertexWithTexture(1, 0, 1, 0, 1); /* West */ GL11.glNormal3d(-1, 0, 0); RenderHelper.addVertexWithTexture(0, 0, 0, 0, 0); RenderHelper.addVertexWithTexture(0, 0, 1, 0, 1); RenderHelper.addVertexWithTexture(0, 1D / 8D, 1, 1, 1); RenderHelper.addVertexWithTexture(0, 1D / 8D, 0, 1, 0); /* North */ GL11.glNormal3d(0, 0, -1); RenderHelper.addVertexWithTexture(0, 0, 0, 0, 0); RenderHelper.addVertexWithTexture(0, 1D / 8D, 0, 1, 0); RenderHelper.addVertexWithTexture(1, 1D / 8D, 0, 1, 1); RenderHelper.addVertexWithTexture(1, 0, 0, 0, 1); /* South */ GL11.glNormal3d(0, 0, 1); RenderHelper.addVertexWithTexture(0, 0, 1, 0, 0); RenderHelper.addVertexWithTexture(1, 0, 1, 0, 1); RenderHelper.addVertexWithTexture(1, 1D / 8D, 1, 1, 1); RenderHelper.addVertexWithTexture(0, 1D / 8D, 1, 1, 0); GL11.glEnd(); } GL11.glPopMatrix(); >>>>>>> if (pass != 0) return; GL11.glPushMatrix(); { super.rotateAndTranslateDynamic(loc, pass, frame); /* Top */ renderTop(frame); Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(Refs.MODID + ":textures/blocks/gates/bottom.png")); GL11.glBegin(GL11.GL_QUADS); /* Bottom */ GL11.glNormal3d(0, -1, 0); RenderHelper.addVertexWithTexture(0, 0, 0, 0, 0); RenderHelper.addVertexWithTexture(1, 0, 0, 1, 0); RenderHelper.addVertexWithTexture(1, 0, 1, 1, 1); RenderHelper.addVertexWithTexture(0, 0, 1, 0, 1); GL11.glEnd(); Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(Refs.MODID + ":textures/blocks/gates/side.png")); GL11.glBegin(GL11.GL_QUADS); /* East */ GL11.glNormal3d(1, 0, 0); RenderHelper.addVertexWithTexture(1, 0, 0, 0, 0); RenderHelper.addVertexWithTexture(1, 1D / 8D, 0, 1, 0); RenderHelper.addVertexWithTexture(1, 1D / 8D, 1, 1, 1); RenderHelper.addVertexWithTexture(1, 0, 1, 0, 1); /* West */ GL11.glNormal3d(-1, 0, 0); RenderHelper.addVertexWithTexture(0, 0, 0, 0, 0); RenderHelper.addVertexWithTexture(0, 0, 1, 0, 1); RenderHelper.addVertexWithTexture(0, 1D / 8D, 1, 1, 1); RenderHelper.addVertexWithTexture(0, 1D / 8D, 0, 1, 0); /* North */ GL11.glNormal3d(0, 0, -1); RenderHelper.addVertexWithTexture(0, 0, 0, 0, 0); RenderHelper.addVertexWithTexture(0, 1D / 8D, 0, 1, 0); RenderHelper.addVertexWithTexture(1, 1D / 8D, 0, 1, 1); RenderHelper.addVertexWithTexture(1, 0, 0, 0, 1); /* South */ GL11.glNormal3d(0, 0, 1); RenderHelper.addVertexWithTexture(0, 0, 1, 0, 0); RenderHelper.addVertexWithTexture(1, 0, 1, 0, 1); RenderHelper.addVertexWithTexture(1, 1D / 8D, 1, 1, 1); RenderHelper.addVertexWithTexture(0, 1D / 8D, 1, 1, 0); GL11.glEnd(); <<<<<<< renderTopTexture(Refs.MODID + ":textures/blocks/gates/" + getType() + "/" + side.getName() + "_" + (state ? "on" : "off") + ".png"); ======= renderTopTexture(Refs.MODID + ":textures/blocks/gates/" + getTextureName() + "/" + side.getName() + "_" + (state ? "on" : "off") + ".png"); >>>>>>> renderTopTexture(Refs.MODID + ":textures/blocks/gates/" + getTextureName() + "/" + side.getName() + "_" + (state ? "on" : "off") + ".png"); <<<<<<< renderTopTexture(Refs.MODID + ":textures/blocks/gates/" + getType() + "/base.png"); renderTop(getConnection(FaceDirection.FRONT), getConnection(FaceDirection.LEFT), getConnection(FaceDirection.BACK), getConnection(FaceDirection.RIGHT), frame); ======= renderTopTexture(Refs.MODID + ":textures/blocks/gates/" + getTextureName() + "/base.png"); renderTop(getConnection(FaceDirection.FRONT), getConnection(FaceDirection.LEFT), getConnection(FaceDirection.BACK), getConnection(FaceDirection.RIGHT), frame); >>>>>>> renderTopTexture(Refs.MODID + ":textures/blocks/gates/" + getTextureName() + "/base.png"); renderTop(getConnection(FaceDirection.FRONT), getConnection(FaceDirection.LEFT), getConnection(FaceDirection.BACK), getConnection(FaceDirection.RIGHT), frame); <<<<<<< renderTopTexture(Refs.MODID + ":textures/blocks/gates/" + getType() + "/base.png"); renderTopItem(getConnection(FaceDirection.FRONT), getConnection(FaceDirection.LEFT), getConnection(FaceDirection.BACK), getConnection(FaceDirection.RIGHT)); ======= renderTopTexture(Refs.MODID + ":textures/blocks/gates/" + getTextureName() + "/base.png"); renderTopItem(getConnection(FaceDirection.FRONT), getConnection(FaceDirection.LEFT), getConnection(FaceDirection.BACK), getConnection(FaceDirection.RIGHT)); >>>>>>> renderTopTexture(Refs.MODID + ":textures/blocks/gates/" + getTextureName() + "/base.png"); renderTopItem(getConnection(FaceDirection.FRONT), getConnection(FaceDirection.LEFT), getConnection(FaceDirection.BACK), getConnection(FaceDirection.RIGHT)); <<<<<<< ======= public boolean isCraftableInCircuitTable() { return true; } >>>>>>> public boolean isCraftableInCircuitTable() { return true; }
<<<<<<< import net.quetzi.bluepower.blocks.BlockProjectTable; ======= import net.quetzi.bluepower.blocks.BlockMonitor; >>>>>>> import net.quetzi.bluepower.blocks.BlockMonitor; import net.quetzi.bluepower.blocks.BlockProjectTable; <<<<<<< public static Block project_table; ======= public static Block cpu; public static Block monitor; public static Block disk_drive; public static Block io_expander; >>>>>>> public static Block project_table; public static Block cpu; public static Block monitor; public static Block disk_drive; public static Block io_expander; <<<<<<< project_table = new BlockProjectTable(); ======= transposer = new BlockTransposer(); cpu = new BlockCPU(); monitor = new BlockMonitor(); disk_drive = new BlockDiskDrive(); io_expander = new BlockIOExpander(); >>>>>>> project_table = new BlockProjectTable(); transposer = new BlockTransposer(); cpu = new BlockCPU(); monitor = new BlockMonitor(); disk_drive = new BlockDiskDrive(); io_expander = new BlockIOExpander(); <<<<<<< GameRegistry.registerBlock(project_table, Refs.PROJECTTABLE_NAME); ======= GameRegistry.registerBlock(transposer, Refs.TRANSPOSER_NAME); GameRegistry.registerBlock(cpu, Refs.BLOCKCPU_NAME); GameRegistry.registerBlock(monitor, Refs.BLOCKMONITOR_NAME); GameRegistry.registerBlock(disk_drive, Refs.BLOCKDISKDRIVE_NAME); GameRegistry.registerBlock(io_expander, Refs.BLOCKIOEXPANDER_NAME); >>>>>>> GameRegistry.registerBlock(project_table, Refs.PROJECTTABLE_NAME); GameRegistry.registerBlock(transposer, Refs.TRANSPOSER_NAME); GameRegistry.registerBlock(cpu, Refs.BLOCKCPU_NAME); GameRegistry.registerBlock(monitor, Refs.BLOCKMONITOR_NAME); GameRegistry.registerBlock(disk_drive, Refs.BLOCKDISKDRIVE_NAME); GameRegistry.registerBlock(io_expander, Refs.BLOCKIOEXPANDER_NAME);
<<<<<<< private static final Set<SpeakerSwitchView.Feature> switchFeatures = Collections.singleton( SpeakerSwitchView.Feature.METERS); ======= private static String switchIpAddress; private static final Set<Switch.Feature> switchFeatures = Collections.singleton(Switch.Feature.METERS); >>>>>>> private static String switchIpAddress; private static final Set<SpeakerSwitchView.Feature> switchFeatures = Collections.singleton( SpeakerSwitchView.Feature.METERS); <<<<<<< switchSocketAddress = new InetSocketAddress(Inet4Address.getByName("127.0.1.1"), 32768); speakerSocketAddress = new InetSocketAddress(Inet4Address.getByName("127.0.1.254"), 6653); switchSocketAddress.getAddress().getHostName(); // force reverse path lookup ======= switchIpAddress = "127.0.1.1"; >>>>>>> switchSocketAddress = new InetSocketAddress(Inet4Address.getByName("127.0.1.1"), 32768); speakerSocketAddress = new InetSocketAddress(Inet4Address.getByName("127.0.1.254"), 6653); switchSocketAddress.getAddress().getHostName(); // force reverse path lookup <<<<<<< ======= expect(switchManager.getSwitchIpAddress(iofSwitch1)).andReturn("127.0.2.1"); expect(switchManager.getSwitchIpAddress(iofSwitch2)).andReturn("127.0.2.2"); >>>>>>> expect(switchManager.getSwitchIpAddress(iofSwitch1)).andReturn("127.0.2.1"); expect(switchManager.getSwitchIpAddress(iofSwitch2)).andReturn("127.0.2.2"); <<<<<<< private SpeakerSwitchView makeSwitchRecord(DatapathId datapath, Set<SpeakerSwitchView.Feature> features, boolean... portState) { List<SpeakerSwitchPortView> ports = new ArrayList<>(portState.length); ======= private Switch makeSwitchRecord(boolean... portState) { return this.makeSwitchRecord(dpId, switchIpAddress, switchFeatures, portState); } private Switch makeSwitchRecord(DatapathId datapath, String ipAddress, Set<Switch.Feature> features, boolean... portState) { List<SwitchPort> ports = new ArrayList<>(portState.length); >>>>>>> private SpeakerSwitchView makeSwitchRecord(DatapathId datapath, String ipAddress, Set<SpeakerSwitchView.Feature> features, boolean... portState) { List<SpeakerSwitchPortView> ports = new ArrayList<>(portState.length);
<<<<<<< BfdPortRepository createBfdPortRepository(); ======= FlowEventRepository createFlowEventRepository(); FlowHistoryRepository createFlowHistoryRepository(); FlowStateRepository createFlowStateRepository(); HistoryLogRepository createHistoryLogRepository(); StateLogRepository createStateLogRepository(); >>>>>>> FlowEventRepository createFlowEventRepository(); FlowHistoryRepository createFlowHistoryRepository(); FlowStateRepository createFlowStateRepository(); HistoryLogRepository createHistoryLogRepository(); StateLogRepository createStateLogRepository(); BfdPortRepository createBfdPortRepository();
<<<<<<< LOGGER.debug("No records found in the database"); Message message = new ChunkedInfoMessage(null, System.currentTimeMillis(), requestId, requestId, responses.size()); ======= log.debug("No records found in the database"); Message message = new ChunkedInfoMessage(null, System.currentTimeMillis(), requestId, null); >>>>>>> log.debug("No records found in the database"); Message message = new ChunkedInfoMessage(null, System.currentTimeMillis(), requestId, requestId, responses.size());
<<<<<<< private void doConfigurePort(final CommandMessage message, final String replyToTopic, final Destination replyDestination) { PortConfigurationRequest request = (PortConfigurationRequest) message.getData(); logger.info("Port configuration request. Switch '{}', Port '{}'", request.getSwitchId(), request.getPortNumber()); try { ISwitchManager switchManager = context.getSwitchManager(); PortConfigurationResponse response = switchManager.configurePort(request); InfoMessage infoMessage = new InfoMessage(response, message.getTimestamp(), message.getCorrelationId()); context.getKafkaProducer().postMessage(replyToTopic, infoMessage); } catch (SwitchOperationException e) { logger.error("Port configuration request failed. " + e.getMessage(), e); ErrorData errorData = new ErrorData(ErrorType.DATA_INVALID, e.getMessage(), "Port configuration request failed"); ErrorMessage error = new ErrorMessage(errorData, System.currentTimeMillis(), message.getCorrelationId(), replyDestination); context.getKafkaProducer().postMessage(replyToTopic, error); } } private long allocateMeterId(Long meterId, String switchId, String flowId, Long cookie) { ======= private long allocateMeterId(Long meterId, SwitchId switchId, String flowId, Long cookie) { >>>>>>> private void doConfigurePort(final CommandMessage message, final String replyToTopic, final Destination replyDestination) { PortConfigurationRequest request = (PortConfigurationRequest) message.getData(); logger.info("Port configuration request. Switch '{}', Port '{}'", request.getSwitchId(), request.getPortNumber()); try { ISwitchManager switchManager = context.getSwitchManager(); PortConfigurationResponse response = switchManager.configurePort(request); InfoMessage infoMessage = new InfoMessage(response, message.getTimestamp(), message.getCorrelationId()); context.getKafkaProducer().postMessage(replyToTopic, infoMessage); } catch (SwitchOperationException e) { logger.error("Port configuration request failed. " + e.getMessage(), e); ErrorData errorData = new ErrorData(ErrorType.DATA_INVALID, e.getMessage(), "Port configuration request failed"); ErrorMessage error = new ErrorMessage(errorData, System.currentTimeMillis(), message.getCorrelationId(), replyDestination); context.getKafkaProducer().postMessage(replyToTopic, error); } } private long allocateMeterId(Long meterId, SwitchId switchId, String flowId, Long cookie) {
<<<<<<< import org.openkilda.messaging.info.discovery.DiscoPacketSendingConfirmation; import org.openkilda.messaging.info.discovery.NetworkSyncBeginMarker; import org.openkilda.messaging.info.discovery.NetworkSyncEndMarker; ======= import org.openkilda.messaging.info.discovery.NetworkDumpBeginMarker; import org.openkilda.messaging.info.discovery.NetworkDumpEndMarker; import org.openkilda.messaging.info.discovery.NetworkDumpPortData; import org.openkilda.messaging.info.discovery.NetworkDumpSwitchData; >>>>>>> import org.openkilda.messaging.info.discovery.DiscoPacketSendingConfirmation; import org.openkilda.messaging.info.discovery.NetworkDumpBeginMarker; import org.openkilda.messaging.info.discovery.NetworkDumpEndMarker; import org.openkilda.messaging.info.discovery.NetworkDumpPortData; import org.openkilda.messaging.info.discovery.NetworkDumpSwitchData;
<<<<<<< // Message message = buildExtendedSwitchMessage( // sw, SwitchState.ACTIVATED, switchManager.dumpFlowTable(switchId)); // kafkaProducer.postMessage(topoDiscoTopic, message); ======= // Message message = buildExtendedSwitchMessage(sw, SwitchState.ACTIVATED, // switchManager.dumpFlowTable(switchId)); // kafkaProducer.postMessage(topoDiscoTopic, message); >>>>>>> // Message message = buildExtendedSwitchMessage(sw, SwitchState.ACTIVATED, // switchManager.dumpFlowTable(switchId)); // kafkaProducer.postMessage(topoDiscoTopic, message); <<<<<<< ======= /** * Return true if port is physical. * * @param p port. * @return true if port is physical. */ public static boolean isPhysicalPort(OFPort p) { return !(p.equals(OFPort.LOCAL) || p.equals(OFPort.ALL) || p.equals(OFPort.CONTROLLER) || p.equals(OFPort.ANY) || p.equals(OFPort.FLOOD) || p.equals(OFPort.ZERO) || p.equals(OFPort.NO_MASK) || p.equals(OFPort.IN_PORT) || p.equals(OFPort.NORMAL) || p.equals(OFPort.TABLE)); } >>>>>>> <<<<<<< * Determine is passed port is a physical port. */ public static boolean isPhysicalPort(OFPort p) { return !(p.equals(OFPort.LOCAL) || p.equals(OFPort.ALL) || p.equals(OFPort.CONTROLLER) || p.equals(OFPort.ANY) || p.equals(OFPort.FLOOD) || p.equals(OFPort.ZERO) || p.equals(OFPort.NO_MASK) || p.equals(OFPort.IN_PORT) || p.equals(OFPort.NORMAL) || p.equals(OFPort.TABLE)); } private static org.openkilda.messaging.info.event.PortChangeType toJsonType(PortChangeType type) { switch (type) { case ADD: return org.openkilda.messaging.info.event.PortChangeType.ADD; case OTHER_UPDATE: return org.openkilda.messaging.info.event.PortChangeType.OTHER_UPDATE; case DELETE: return org.openkilda.messaging.info.event.PortChangeType.DELETE; case UP: return org.openkilda.messaging.info.event.PortChangeType.UP; default: return org.openkilda.messaging.info.event.PortChangeType.DOWN; } } /** * Builds a switch message type. ======= * Builds a switch message type with flows. >>>>>>> * Return true if port is physical. * * @param p port. * @return true if port is physical. */ public static boolean isPhysicalPort(OFPort p) { return !(p.equals(OFPort.LOCAL) || p.equals(OFPort.ALL) || p.equals(OFPort.CONTROLLER) || p.equals(OFPort.ANY) || p.equals(OFPort.FLOOD) || p.equals(OFPort.ZERO) || p.equals(OFPort.NO_MASK) || p.equals(OFPort.IN_PORT) || p.equals(OFPort.NORMAL) || p.equals(OFPort.TABLE)); } private static org.openkilda.messaging.info.event.PortChangeType toJsonType(PortChangeType type) { switch (type) { case ADD: return org.openkilda.messaging.info.event.PortChangeType.ADD; case OTHER_UPDATE: return org.openkilda.messaging.info.event.PortChangeType.OTHER_UPDATE; case DELETE: return org.openkilda.messaging.info.event.PortChangeType.DELETE; case UP: return org.openkilda.messaging.info.event.PortChangeType.UP; default: return org.openkilda.messaging.info.event.PortChangeType.DOWN; } } /** * Builds a switch message type. * * @param sw switch instance * @param eventType type of event * @return Message */ public static Message buildSwitchMessage(final IOFSwitch sw, final SwitchState eventType) { return buildMessage(IofSwitchConverter.buildSwitchInfoData(sw, eventType)); } /** * Builds a switch message type. * * @param switchId switch id * @param eventType type of event * @return Message */ public static Message buildSwitchMessage(final DatapathId switchId, final SwitchState eventType) { final String unknown = "unknown"; InfoData data = new SwitchInfoData(new SwitchId(switchId.getLong()), eventType, unknown, unknown, unknown, unknown); return buildMessage(data); } /** * Builds a switch message type with flows.
<<<<<<< @Override public void onResponse(Object message) { } private Message getFlowResponse(FlowIdStatusPayload request, String correlationId) { if (request != null) { if (ERROR_FLOW_ID.equals((request.getId()))) { return new ErrorMessage(new ErrorData(ErrorType.NOT_FOUND, "Flow was not found", ERROR_FLOW_ID), 0, correlationId, Destination.NORTHBOUND); } else { return new InfoMessage(flowResponse, 0, correlationId, Destination.NORTHBOUND); } ======= private Message getReadFlowResponse(String flowId, String correlationId) { if (ERROR_FLOW_ID.equals(flowId)) { return new ErrorMessage(new ErrorData(ErrorType.NOT_FOUND, "Flow was not found", ERROR_FLOW_ID), 0, correlationId, Destination.NORTHBOUND); >>>>>>> @Override public void onResponse(Object message) { } private Message getReadFlowResponse(String flowId, String correlationId) { if (ERROR_FLOW_ID.equals(flowId)) { return new ErrorMessage(new ErrorData(ErrorType.NOT_FOUND, "Flow was not found", ERROR_FLOW_ID), 0, correlationId, Destination.NORTHBOUND);
<<<<<<< import java.net.InetAddress; import java.net.InetSocketAddress; ======= >>>>>>> import java.net.InetAddress; import java.net.InetSocketAddress; <<<<<<< switchAddress, speakerAddress, "OF_13", switchDescription, Collections.emptySet(), ======= "127.0.2.2", ImmutableSet.of(Switch.Feature.METERS), >>>>>>> switchAddress, speakerAddress, "OF_13", switchDescription, ImmutableSet.of(SpeakerSwitchView.Feature.METERS),
<<<<<<< @Override public BfdPortRepository createBfdPortRepository() { return new Neo4JBfdPortRepository(sessionFactory, transactionManager); } ======= @Override public FlowEventRepository createFlowEventRepository() { return new Neo4jFlowEventRepository(sessionFactory, transactionManager); } @Override public FlowHistoryRepository createFlowHistoryRepository() { return new Neo4jFlowHistoryRepository(sessionFactory, transactionManager); } @Override public FlowStateRepository createFlowStateRepository() { return new Neo4jFlowStateRepository(sessionFactory, transactionManager); } @Override public HistoryLogRepository createHistoryLogRepository() { return new Neo4jHistoryLogRepository(sessionFactory, transactionManager); } @Override public StateLogRepository createStateLogRepository() { return new Neo4jStateLogRepository(sessionFactory, transactionManager); } >>>>>>> @Override public FlowEventRepository createFlowEventRepository() { return new Neo4jFlowEventRepository(sessionFactory, transactionManager); } @Override public FlowHistoryRepository createFlowHistoryRepository() { return new Neo4jFlowHistoryRepository(sessionFactory, transactionManager); } @Override public FlowStateRepository createFlowStateRepository() { return new Neo4jFlowStateRepository(sessionFactory, transactionManager); } @Override public HistoryLogRepository createHistoryLogRepository() { return new Neo4jHistoryLogRepository(sessionFactory, transactionManager); } @Override public StateLogRepository createStateLogRepository() { return new Neo4jStateLogRepository(sessionFactory, transactionManager); } @Override public BfdPortRepository createBfdPortRepository() { return new Neo4JBfdPortRepository(sessionFactory, transactionManager); }
<<<<<<< import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.storm.Config; import org.apache.storm.LocalCluster; import org.apache.storm.StormSubmitter; import org.apache.storm.generated.StormTopology; import org.apache.storm.tuple.Fields; ======= >>>>>>> import org.apache.storm.tuple.Fields; <<<<<<< private static final Logger logger = LogManager.getLogger(SimulatorTopology.class); private final String topoName = "simulatorTopology"; private final int parallelism = 1; public static final String SIMULATOR_TOPIC = "kilda-simulator"; public static final String COMMAND_TOPIC = "kilda-test"; public static final String SIMULATOR_SPOUT = "simulator-spout"; public static final String COMMAND_SPOUT = "command-spout"; ======= private static final Logger logger = LoggerFactory.getLogger(SimulatorTopology.class); public static final String DEPLOY_TOPOLOGY_BOLT_STREAM = "deploy_topology_stream"; >>>>>>> private final String topoName = "simulatorTopology"; private final int parallelism = 1; public static final String SIMULATOR_TOPIC = "kilda-simulator"; public static final String COMMAND_TOPIC = "kilda-test"; public static final String SIMULATOR_SPOUT = "simulator-spout"; public static final String COMMAND_SPOUT = "command-spout"; private static final Logger logger = LoggerFactory.getLogger(SimulatorTopology.class); public static final String DEPLOY_TOPOLOGY_BOLT_STREAM = "deploy_topology_stream"; <<<<<<< public SimulatorTopology(File file) { super(file); } public static void main(String[] args) throws Exception { //If there are arguments, we are running on a cluster; otherwise, we are running locally if (args != null && args.length > 0) { File file = new File(args[1]); Config conf = new Config(); conf.setDebug(false); SimulatorTopology simulatorTopology = new SimulatorTopology(file); StormTopology topo = simulatorTopology.createTopology(); conf.setNumWorkers(simulatorTopology.parallelism); StormSubmitter.submitTopology(args[0], conf, topo); } else { File file = new File(SimulatorTopology.class.getResource(Topology.TOPOLOGY_PROPERTIES).getFile()); Config conf = new Config(); conf.setDebug(false); SimulatorTopology simulatorTopology = new SimulatorTopology(file); StormTopology topo = simulatorTopology.createTopology(); conf.setMaxTaskParallelism(3); LocalCluster cluster = new LocalCluster(); cluster.submitTopology(simulatorTopology.topologyName, conf, topo); while(true) { Thread.sleep(60000); } // cluster.shutdown(); } ======= public SimulatorTopology(LaunchEnvironment env) throws ConfigurationException { super(env); >>>>>>> public SimulatorTopology(LaunchEnvironment env) throws ConfigurationException { super(env); <<<<<<< logger.debug("starting " + COMMAND_BOLT + " bolt"); builder.setBolt(COMMAND_BOLT, commandBolt, parallelism) .shuffleGrouping(SIMULATOR_SPOUT) .shuffleGrouping(COMMAND_SPOUT); ======= logger.debug("starting " + commandBoltName + " bolt"); builder.setBolt(commandBoltName, commandBolt, parallelism) .shuffleGrouping(simulatorSpout) .shuffleGrouping(commandSpout); >>>>>>> logger.debug("starting " + COMMAND_BOLT + " bolt"); builder.setBolt(COMMAND_BOLT, commandBolt, parallelism) .shuffleGrouping(SIMULATOR_SPOUT) .shuffleGrouping(COMMAND_SPOUT); <<<<<<< final String KILDA_TOPIC = "kilda-test"; checkAndCreateTopic(KILDA_TOPIC); builder.setBolt(KAFKA_BOLT, createKafkaBolt(KILDA_TOPIC), parallelism) .shuffleGrouping(SWITCH_BOLT, KAFKA_BOLT_STREAM); ======= // TODO(dbogun): check is it must be output topic final String kafkaBoltName = inputTopic + "Bolt"; checkAndCreateTopic(inputTopic); builder.setBolt(kafkaBoltName, createKafkaBolt(inputTopic), parallelism) .shuffleGrouping(switchBoltName); >>>>>>> // TODO(dbogun): check is it must be output topic checkAndCreateTopic(inputTopic); builder.setBolt(KAFKA_BOLT, createKafkaBolt(inputTopic), parallelism) .shuffleGrouping(SWITCH_BOLT, KAFKA_BOLT_STREAM);
<<<<<<< import org.openkilda.floodlight.command.ping.PingRequestCommand; import org.openkilda.floodlight.converter.IOFSwitchConverter; ======= import org.openkilda.floodlight.command.flow.VerificationDispatchCommand; >>>>>>> import org.openkilda.floodlight.command.ping.PingRequestCommand; <<<<<<< } else if (data instanceof PingRequest) { doPingRequest(context, (PingRequest) data); ======= } else if (data instanceof UniFlowVerificationRequest) { doFlowVerificationRequest(context, (UniFlowVerificationRequest) data); } else if (data instanceof DeleteMeterRequest) { doDeleteMeter(message, replyToTopic, replyDestination); >>>>>>> } else if (data instanceof PingRequest) { doPingRequest(context, (PingRequest) data); } else if (data instanceof DeleteMeterRequest) { doDeleteMeter(message, replyToTopic, replyDestination);
<<<<<<< private void dispatch(Tuple tuple, InfoMessage infoMessage) { switch (state) { case NEED_SYNC: dispatchNeedSync(tuple, infoMessage); break; case WAIT_SYNC: dispatchWaitSync(tuple, infoMessage); break; case SYNC_IN_PROGRESS: dispatchSyncInProgress(tuple, infoMessage); break; case OFFLINE: dispatchOffline(tuple, infoMessage); break; case MAIN: dispatchMain(tuple, infoMessage); break; default: reportInvalidEvent(infoMessage.getData()); } } private void dispatchNeedSync(Tuple tuple, InfoMessage infoMessage) { logger.warn("Bolt internal state is out of sync with FL, skip tuple"); } private void dispatchWaitSync(Tuple tuple, InfoMessage infoMessage) { InfoData data = infoMessage.getData(); if (data instanceof NetworkDumpBeginMarker) { if (dumpRequestCorrelationId.equals(infoMessage.getCorrelationId())) { logger.info("Got response on network sync request, start processing network events"); enableDumpRequestTimer(); stateTransition(State.SYNC_IN_PROGRESS); } else { logger.warn( "Got response on network sync request with invalid " + "correlation-id(expect: \"{}\", got: \"{}\")", dumpRequestCorrelationId, infoMessage.getCorrelationId()); } } else { reportInvalidEvent(data); } } private SpeakerSwitchView cleanUpLogicalPorts(SpeakerSwitchView originalSwitch) { ======= private Switch cleanUpLogicalPorts(Switch originalSwitch) { >>>>>>> private SpeakerSwitchView cleanUpLogicalPorts(SpeakerSwitchView originalSwitch) { <<<<<<< SpeakerSwitchView switchWithNoBfdPorts = cleanUpLogicalPorts(networkDumpSwitchData.getSwitchView()); ======= Switch switchWithNoBfdPorts = cleanUpLogicalPorts(networkDumpSwitchData.getSwitchRecord()); unmanagedSwitches.remove(switchWithNoBfdPorts.getDatapath()); >>>>>>> SpeakerSwitchView switchWithNoBfdPorts = cleanUpLogicalPorts(networkDumpSwitchData.getSwitchView()); unmanagedSwitches.remove(switchWithNoBfdPorts.getDatapath()); <<<<<<< SpeakerSwitchView switchWithNoBfdPorts = cleanUpLogicalPorts(switchData.getSwitchView()); SwitchInfoData switchDataWithNoBfdPorts = switchData.toBuilder().switchView(switchWithNoBfdPorts).build(); ======= unmanagedSwitches.remove(switchData.getSwitchId()); Switch switchWithNoBfdPorts = cleanUpLogicalPorts(switchData.getSwitchRecord()); SwitchInfoData switchDataWithNoBfdPorts = switchData.toBuilder().switchRecord(switchWithNoBfdPorts).build(); >>>>>>> unmanagedSwitches.remove(switchData.getSwitchId()); SpeakerSwitchView switchWithNoBfdPorts = cleanUpLogicalPorts(switchData.getSwitchView()); SwitchInfoData switchDataWithNoBfdPorts = switchData.toBuilder().switchView(switchWithNoBfdPorts).build();
<<<<<<< ======= import org.openkilda.messaging.command.flow.FlowVerificationRequest; import org.openkilda.messaging.command.flow.FlowsDumpRequest; >>>>>>> import org.openkilda.messaging.command.flow.FlowsDumpRequest;
<<<<<<< import org.openkilda.messaging.command.flow.FlowGetRequest; import org.openkilda.messaging.command.flow.FlowPingRequest; ======= import org.openkilda.messaging.command.flow.FlowReadRequest; >>>>>>> import org.openkilda.messaging.command.flow.FlowPingRequest; import org.openkilda.messaging.command.flow.FlowReadRequest; <<<<<<< ======= import org.openkilda.messaging.command.flow.FlowVerificationRequest; import org.openkilda.messaging.command.flow.FlowsDumpRequest; >>>>>>> import org.openkilda.messaging.command.flow.FlowsDumpRequest; <<<<<<< import org.openkilda.messaging.info.flow.FlowPingResponse; ======= import org.openkilda.messaging.info.flow.FlowReadResponse; >>>>>>> import org.openkilda.messaging.info.flow.FlowPingResponse; import org.openkilda.messaging.info.flow.FlowReadResponse; <<<<<<< LOGGER.debug("Create flow: {}={}", CORRELATION_ID, correlationId); FlowCreateRequest payload = new FlowCreateRequest(new Flow(input)); CommandMessage request = new CommandMessage( payload, System.currentTimeMillis(), correlationId, Destination.WFM); ======= LOGGER.debug("Create flow: {}", flow); FlowCreateRequest data = new FlowCreateRequest(FlowPayloadToFlowConverter.buildFlowByFlowPayload(flow)); CommandMessage request = new CommandMessage(data, System.currentTimeMillis(), correlationId, Destination.WFM); >>>>>>> LOGGER.debug("Create flow: {}", input); FlowCreateRequest payload = new FlowCreateRequest(new Flow(input)); CommandMessage request = new CommandMessage( payload, System.currentTimeMillis(), correlationId, Destination.WFM); <<<<<<< return flowMapper.toFlowOutput(response.getPayload()); ======= return flowMapper.toFlowPayload(response.getPayload()); >>>>>>> return flowMapper.toFlowOutput(response.getPayload()); <<<<<<< return flowMapper.toFlowOutput(response.getPayload()); ======= return flowMapper.toFlowPayload(response.getPayload()); >>>>>>> return flowMapper.toFlowOutput(response.getPayload()); <<<<<<< final String correlationId = RequestCorrelationId.getId(); LOGGER.debug("Get flow: {}={}", CORRELATION_ID, correlationId); FlowGetRequest data = new FlowGetRequest(new FlowIdStatusPayload(id, null)); CommandMessage request = new CommandMessage(data, System.currentTimeMillis(), correlationId, Destination.WFM); messageConsumer.clear(); messageProducer.send(topic, request); Message message = (Message) messageConsumer.poll(correlationId); FlowResponse response = (FlowResponse) validateInfoMessage(request, message, correlationId); return flowMapper.toFlowOutput(response.getPayload()); ======= logger.debug("Get flow: {}={}", FLOW_ID, id); BidirectionalFlow flow = getBidirectionalFlow(id, RequestCorrelationId.getId()); return flowMapper.toFlowPayload(flow.getForward()); >>>>>>> logger.debug("Get flow: {}={}", FLOW_ID, id); BidirectionalFlow flow = getBidirectionalFlow(id, RequestCorrelationId.getId()); return flowMapper.toFlowOutput(flow.getForward()); <<<<<<< LOGGER.debug("Update flow: {}={}", CORRELATION_ID, correlationId); FlowUpdateRequest payload = new FlowUpdateRequest(new Flow(input)); CommandMessage request = new CommandMessage( payload, System.currentTimeMillis(), correlationId, Destination.WFM); ======= logger.debug("Update flow: {}={}", FLOW_ID, flow.getId()); FlowUpdateRequest data = new FlowUpdateRequest(FlowPayloadToFlowConverter.buildFlowByFlowPayload(flow)); CommandMessage request = new CommandMessage(data, System.currentTimeMillis(), correlationId, Destination.WFM); >>>>>>> logger.debug("Update flow: {}={}", FLOW_ID, input.getId()); FlowUpdateRequest payload = new FlowUpdateRequest(new Flow(input)); CommandMessage request = new CommandMessage( payload, System.currentTimeMillis(), correlationId, Destination.WFM); <<<<<<< return flowMapper.toFlowOutput(response.getPayload()); ======= return flowMapper.toFlowPayload(response.getPayload()); >>>>>>> return flowMapper.toFlowOutput(response.getPayload()); <<<<<<< .map(FlowResponse::getPayload) .map(flowMapper::toFlowOutput) ======= .map(FlowReadResponse::getPayload) .map(BidirectionalFlow::getForward) .map(flowMapper::toFlowPayload) >>>>>>> .map(FlowReadResponse::getPayload) .map(BidirectionalFlow::getForward) .map(flowMapper::toFlowOutput)
<<<<<<< import org.openkilda.model.SwitchConnectedDevice; ======= import org.openkilda.model.IslEndpoint; >>>>>>> import org.openkilda.model.IslEndpoint; import org.openkilda.model.SwitchConnectedDevice;
<<<<<<< import org.openkilda.messaging.info.event.IslChangeType; import org.openkilda.messaging.info.event.IslInfoData; import org.openkilda.messaging.info.event.PathInfoData; import org.openkilda.messaging.info.event.PathNode; import org.openkilda.messaging.info.event.SwitchInfoData; import org.openkilda.messaging.info.event.SwitchState; ======= import static org.openkilda.pce.Utils.safeAsInt; import org.openkilda.messaging.info.event.IslChangeType; import org.openkilda.messaging.info.event.IslInfoData; import org.openkilda.messaging.info.event.PathInfoData; import org.openkilda.messaging.info.event.PathNode; import org.openkilda.messaging.info.event.SwitchInfoData; import org.openkilda.messaging.info.event.SwitchState; >>>>>>> import static org.openkilda.pce.Utils.safeAsInt; import org.openkilda.messaging.info.event.IslChangeType; import org.openkilda.messaging.info.event.IslInfoData; import org.openkilda.messaging.info.event.PathInfoData; import org.openkilda.messaging.info.event.PathNode; import org.openkilda.messaging.info.event.SwitchInfoData; import org.openkilda.messaging.info.event.SwitchState; <<<<<<< import org.apache.commons.lang3.tuple.Pair; import org.neo4j.driver.v1.Driver; import org.neo4j.driver.v1.Record; import org.neo4j.driver.v1.Session; import org.neo4j.driver.v1.StatementResult; import org.neo4j.driver.v1.Value; ======= import org.apache.commons.lang3.tuple.Pair; import org.neo4j.driver.v1.AccessMode; import org.neo4j.driver.v1.Driver; import org.neo4j.driver.v1.Record; import org.neo4j.driver.v1.Session; import org.neo4j.driver.v1.StatementResult; >>>>>>> import org.apache.commons.lang3.tuple.Pair; import org.neo4j.driver.v1.AccessMode; import org.neo4j.driver.v1.Driver; import org.neo4j.driver.v1.Record; import org.neo4j.driver.v1.Session; import org.neo4j.driver.v1.StatementResult; <<<<<<< ======= >>>>>>> <<<<<<< Pair<LinkedList<SimpleIsl>, LinkedList<SimpleIsl>> biPath = getPathFromNetwork(flow, strategy); if (biPath.getLeft().size() == 0 || biPath.getRight().size() == 0) { ======= Pair<LinkedList<SimpleIsl>, LinkedList<SimpleIsl>> biPath = getPathFromNetwork(flow, network, strategy); if (biPath.getLeft().size() == 0 || biPath.getRight().size() == 0) { >>>>>>> Pair<LinkedList<SimpleIsl>, LinkedList<SimpleIsl>> biPath = getPathFromNetwork(flow, network, strategy); if (biPath.getLeft().size() == 0 || biPath.getRight().size() == 0) { <<<<<<< latency += isl.latency; forwardNodes.add(new PathNode(isl.src_dpid, isl.src_port, seqId++, (long) isl.latency)); forwardNodes.add(new PathNode(isl.dst_dpid, isl.dst_port, seqId++, 0L)); ======= latency += isl.getLatency(); forwardNodes.add(new PathNode(isl.getSrcDpid(), isl.getSrcPort(), seqId++, (long) isl.getLatency())); forwardNodes.add(new PathNode(isl.getDstDpid(), isl.getDstPort(), seqId++, 0L)); >>>>>>> latency += isl.getLatency(); forwardNodes.add(new PathNode(isl.getSrcDpid(), isl.getSrcPort(), seqId++, (long) isl.getLatency())); forwardNodes.add(new PathNode(isl.getDstDpid(), isl.getDstPort(), seqId++, 0L)); <<<<<<< reverseNodes.add(new PathNode(isl.src_dpid, isl.src_port, seqId++, (long) isl.latency)); reverseNodes.add(new PathNode(isl.dst_dpid, isl.dst_port, seqId++, 0L)); ======= reverseNodes.add(new PathNode(isl.getSrcDpid(), isl.getSrcPort(), seqId++, (long) isl.getLatency())); reverseNodes.add(new PathNode(isl.getDstDpid(), isl.getDstPort(), seqId++, 0L)); >>>>>>> reverseNodes.add(new PathNode(isl.getSrcDpid(), isl.getSrcPort(), seqId++, (long) isl.getLatency())); reverseNodes.add(new PathNode(isl.getDstDpid(), isl.getDstPort(), seqId++, 0L)); <<<<<<< private Pair<LinkedList<SimpleIsl>, LinkedList<SimpleIsl>> getPathFromNetwork(Flow flow, Strategy strategy) { ======= private Pair<LinkedList<SimpleIsl>, LinkedList<SimpleIsl>> getPathFromNetwork(Flow flow, AvailableNetwork network, Strategy strategy) { >>>>>>> private Pair<LinkedList<SimpleIsl>, LinkedList<SimpleIsl>> getPathFromNetwork(Flow flow, AvailableNetwork network, Strategy strategy) { <<<<<<< SimpleGetShortestPath forward = new SimpleGetShortestPath( network, flow.getSourceSwitch(), flow.getDestinationSwitch(), 35); SimpleGetShortestPath reverse = new SimpleGetShortestPath( network, flow.getDestinationSwitch(), flow.getSourceSwitch(), 35); ======= SimpleGetShortestPath forward = new SimpleGetShortestPath(network, flow.getSourceSwitch(), flow.getDestinationSwitch(), 35); SimpleGetShortestPath reverse = new SimpleGetShortestPath(network, flow.getDestinationSwitch(), flow.getSourceSwitch(), 35); >>>>>>> SimpleGetShortestPath forward = new SimpleGetShortestPath( network, flow.getSourceSwitch(), flow.getDestinationSwitch(), 35); SimpleGetShortestPath reverse = new SimpleGetShortestPath( network, flow.getDestinationSwitch(), flow.getSourceSwitch(), 35); <<<<<<< return Pair.of(forwardPath, reversePath); ======= Pair<LinkedList<SimpleIsl>, LinkedList<SimpleIsl>> path = Pair.of(forwardPath, reversePath); return path; >>>>>>> return Pair.of(forwardPath, reversePath); <<<<<<< String subject = "MATCH (:switch)-[f:flow]->(:switch)" + "\nRETURN f.flowid as flow_id, " + "f.cookie as cookie, " + "f.meter_id as meter_id, " + "f.transit_vlan as transit_vlan, " + "f.src_switch as src_switch"; Session session = driver.session(); StatementResult result = session.run(subject); for (Record record : result.list()) { flows.add(new FlowInfo() .setFlowId(record.get("flow_id").asString()) .setSrcSwitchId(record.get("src_switch").asString()) .setCookie(record.get("cookie").asLong()) .setMeterId(safeAsInt(record.get("meter_id"))) .setTransitVlanId(safeAsInt(record.get("transit_vlan"))) ); ======= String subject = "MATCH (:switch)-[f:flow]->(:switch) " + "RETURN f.flowid as flow_id, " + " f.cookie as cookie, " + " f.meter_id as meter_id, " + " f.transit_vlan as transit_vlan, " + " f.src_switch as src_switch"; try (Session session = driver.session(AccessMode.READ)) { StatementResult result = session.run(subject); for (Record record : result.list()) { flows.add(new FlowInfo() .setFlowId(record.get("flow_id").asString()) .setSrcSwitchId(record.get("src_switch").asString()) .setCookie(record.get("cookie").asLong()) .setMeterId(safeAsInt(record.get("meter_id"))) .setTransitVlanId(safeAsInt(record.get("transit_vlan"))) ); } >>>>>>> String subject = "MATCH (:switch)-[f:flow]->(:switch)" + "\nRETURN f.flowid as flow_id, " + "f.cookie as cookie, " + "f.meter_id as meter_id, " + "f.transit_vlan as transit_vlan, " + "f.src_switch as src_switch"; try (Session session = driver.session(AccessMode.READ)) { StatementResult result = session.run(subject); for (Record record : result.list()) { flows.add(new FlowInfo() .setFlowId(record.get("flow_id").asString()) .setSrcSwitchId(record.get("src_switch").asString()) .setCookie(record.get("cookie").asLong()) .setMeterId(safeAsInt(record.get("meter_id"))) .setTransitVlanId(safeAsInt(record.get("transit_vlan"))) ); } <<<<<<< String where = "WHERE f.flowid='" + flowId + "'"; return queryFlows(where); ======= String where = "WHERE f.flowid='" + flowId + "' "; return loadFlows(where); >>>>>>> String where = "WHERE f.flowid='" + flowId + "'"; return loadFlows(where);
<<<<<<< import org.openkilda.messaging.payload.switches.PortConfigurationPayload; ======= import org.openkilda.messaging.model.SwitchId; >>>>>>> import org.openkilda.messaging.model.SwitchId; import org.openkilda.messaging.payload.switches.PortConfigurationPayload; <<<<<<< DeleteMeterResult deleteMeter(String switchId, long meterId); /** * Configure switch port. <br> * Configurations * <ul> * <li> UP/DOWN port </li> * <li> Change port speed </li> * </ul> * * @param switchId switch whose port is to configure * @param port port to configure * @param portConfig port configuration that needs to apply on port * @return portDto */ PortDto configurePort(String switchId, int port, PortConfigurationPayload portConfig); ======= DeleteMeterResult deleteMeter(SwitchId switchId, long meterId); >>>>>>> DeleteMeterResult deleteMeter(SwitchId switchId, long meterId); /** * Configure switch port. <br> * Configurations * <ul> * <li> UP/DOWN port </li> * <li> Change port speed </li> * </ul> * * @param switchId switch whose port is to configure * @param port port to configure * @param portConfig port configuration that needs to apply on port * @return portDto */ PortDto configurePort(String switchId, int port, PortConfigurationPayload portConfig);
<<<<<<< import org.openkilda.messaging.nbtopology.request.GetFlowHistoryRequest; ======= import org.openkilda.messaging.nbtopology.request.FlowPatchRequest; import org.openkilda.messaging.nbtopology.request.GetFlowPathRequest; import org.openkilda.messaging.nbtopology.response.GetFlowPathResponse; import org.openkilda.messaging.payload.flow.DiverseGroupPayload; import org.openkilda.messaging.payload.flow.FlowCreatePayload; >>>>>>> import org.openkilda.messaging.nbtopology.request.FlowPatchRequest; import org.openkilda.messaging.nbtopology.request.GetFlowHistoryRequest; import org.openkilda.messaging.nbtopology.request.GetFlowPathRequest; import org.openkilda.messaging.nbtopology.response.GetFlowPathResponse; import org.openkilda.messaging.payload.flow.DiverseGroupPayload; import org.openkilda.messaging.payload.flow.FlowCreatePayload; <<<<<<< import org.openkilda.messaging.payload.history.FlowEventPayload; ======= import org.openkilda.messaging.payload.flow.FlowUpdatePayload; import org.openkilda.messaging.payload.flow.GroupFlowPathPayload; >>>>>>> import org.openkilda.messaging.payload.flow.FlowUpdatePayload; import org.openkilda.messaging.payload.flow.GroupFlowPathPayload; import org.openkilda.messaging.payload.history.FlowEventPayload;
<<<<<<< import org.rajawali3d.cameras.Camera; import org.rajawali3d.RajawaliActivity; ======= import org.rajawali3d.Camera; >>>>>>> import org.rajawali3d.cameras.Camera;
<<<<<<< import org.apache.http.ParseException; import rajawali.BaseObject3D; import rajawali.parser.AWDParser.AWDLittleEndianDataInputStream; import rajawali.parser.AWDParser.BlockHeader; ======= import rajawali.Object3D; import rajawali.parser.LoaderAWD.BlockHeader; import rajawali.util.LittleEndianDataInputStream; >>>>>>> import org.apache.http.ParseException; import rajawali.Object3D; import rajawali.parser.LoaderAWD.AWDLittleEndianDataInputStream; import rajawali.parser.LoaderAWD.BlockHeader; <<<<<<< public BaseObject3D getBaseObject3D() { if (mBaseObjects.length == 1) return mBaseObjects[0]; ======= public Object3D getBaseObject3D() { if (baseObjects.length == 1) return baseObjects[0]; >>>>>>> public Object3D getBaseObject3D() { if (mBaseObjects.length == 1) return mBaseObjects[0]; <<<<<<< // Lookup name mLookupName = dis.readVarString(); ======= // Count of sub geometries subGeometryCount = dis.readUnsignedShort(); baseObjects = new Object3D[subGeometryCount]; RajLog.d(" Sub Geometry Count: " + subGeometryCount); >>>>>>> // Lookup name mLookupName = dis.readVarString(); <<<<<<< dis.readUserAttributes(null); // Verify the arrays if (vertices == null) vertices = new float[0]; if (normals == null) normals = new float[0]; if (uvs == null) uvs = new float[0]; if (indices == null) indices = new int[0]; // FIXME This should be combining sub geometry not creating objects mBaseObjects[parsedSub] = new BaseObject3D(); mBaseObjects[parsedSub].setData(vertices, normals, uvs, null, indices); ======= baseObjects[parsedSubs] = new Object3D(); baseObjects[parsedSubs].setData(vertices, normals, uvs, null, indices); parsedSubs++; >>>>>>> dis.readUserAttributes(null); // Verify the arrays if (vertices == null) vertices = new float[0]; if (normals == null) normals = new float[0]; if (uvs == null) uvs = new float[0]; if (indices == null) indices = new int[0]; // FIXME This should be combining sub geometry not creating objects mBaseObjects[parsedSub] = new Object3D(); mBaseObjects[parsedSub].setData(vertices, normals, uvs, null, indices);
<<<<<<< import rajawali.materials.TextureInfo; import rajawali.materials.TextureManager.TextureType; import rajawali.materials.textures.TextureAtlas; import rajawali.materials.textures.TexturePacker.Tile; import rajawali.math.Number3D; ======= import rajawali.materials.textures.ATexture.TextureException; import rajawali.math.Vector3; >>>>>>> import rajawali.materials.textures.ATexture.TextureException; import rajawali.materials.textures.TextureAtlas; import rajawali.materials.textures.TexturePacker.Tile; import rajawali.math.Vector3;
<<<<<<< import gov.sandia.cognition.math.matrix.SparseVectorFactory; ======= import gov.sandia.cognition.math.UnivariateScalarFunction; >>>>>>> import gov.sandia.cognition.math.matrix.SparseVectorFactory; import gov.sandia.cognition.math.UnivariateScalarFunction;
<<<<<<< /* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. * * See the License for the specific language governing permissions and * limitations under the License. */ package org.ops4j.pax.web.itest.jetty; import static org.junit.Assert.fail; import static org.ops4j.pax.exam.CoreOptions.systemProperty; import java.util.Dictionary; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.OptionUtils; import org.ops4j.pax.exam.junit.PaxExam; import org.ops4j.pax.web.itest.base.VersionUtil; import org.osgi.framework.Bundle; import org.osgi.framework.BundleException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; ======= /* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. * * See the License for the specific language governing permissions and * limitations under the License. */ package org.ops4j.pax.web.itest.jetty; import org.junit.After; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.OptionUtils; import org.ops4j.pax.exam.junit.PaxExam; import org.ops4j.pax.web.itest.base.VersionUtil; import org.ops4j.pax.web.itest.base.client.HttpTestClientFactory; import org.osgi.framework.Bundle; import org.osgi.framework.BundleException; import static org.ops4j.pax.exam.CoreOptions.systemProperty; >>>>>>> /* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. * * See the License for the specific language governing permissions and * limitations under the License. */ package org.ops4j.pax.web.itest.jetty; import static org.junit.Assert.fail; import static org.ops4j.pax.exam.CoreOptions.systemProperty; import java.util.Dictionary; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.OptionUtils; import org.ops4j.pax.exam.junit.PaxExam; import org.ops4j.pax.web.itest.base.VersionUtil; import org.ops4j.pax.web.itest.base.client.HttpTestClientFactory; import org.osgi.framework.Bundle; import org.osgi.framework.BundleException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; <<<<<<< ======= // MavenArtifactUrlReference urlReference = maven() // .groupId("org.mortbay.jetty.npn").artifactId("npn-boot") // .version("8.1.2.v20120308"); // BootClasspathLibraryOption bootClasspathLibraryOption = new BootClasspathLibraryOption( // urlReference); >>>>>>> <<<<<<< /** * You will get a list of bundles installed by default plus your testcase, * wrapped into a bundle called pax-exam-probe */ @Test public void listBundles() { for (final Bundle b : bundleContext.getBundles()) { if (b.getState() != Bundle.ACTIVE && b.getState() != Bundle.RESOLVED) { if (!b.getSymbolicName().contains("alpn")) fail("Bundle should be active: " + b); } final Dictionary<String, String> headers = b.getHeaders(); final String ctxtPath = (String) headers.get(WEB_CONTEXT_PATH); if (ctxtPath != null) { System.out.println("Bundle " + b.getBundleId() + " : " + b.getSymbolicName() + " : " + ctxtPath); } else { System.out.println("Bundle " + b.getBundleId() + " : " + b.getSymbolicName()); } } } ======= >>>>>>> /** * You will get a list of bundles installed by default plus your testcase, * wrapped into a bundle called pax-exam-probe */ @Test public void listBundles() { for (final Bundle b : bundleContext.getBundles()) { if (b.getState() != Bundle.ACTIVE && b.getState() != Bundle.RESOLVED) { if (!b.getSymbolicName().contains("alpn")) fail("Bundle should be active: " + b); } final Dictionary<String, String> headers = b.getHeaders(); final String ctxtPath = (String) headers.get(WEB_CONTEXT_PATH); if (ctxtPath != null) { System.out.println("Bundle " + b.getBundleId() + " : " + b.getSymbolicName() + " : " + ctxtPath); } else { System.out.println("Bundle " + b.getBundleId() + " : " + b.getSymbolicName()); } } }
<<<<<<< ======= >>>>>>> <<<<<<< ======= @Inject BundleContext bundleContext = null; >>>>>>> <<<<<<< private WebListener webListener; @Inject private BundleContext bundleContext = null; private static final String WEB_CONTEXT_PATH = "Web-ContextPath"; private static final String WEB_BUNDLE = "webbundle:"; @Configuration public static Option[] configure() { return options( logProfile(), configProfile(), compendiumProfile(), systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level") .value("DEBUG"), systemProperty("org.osgi.service.webcontainer.hostname").value( "127.0.0.1"), systemProperty("org.osgi.service.webcontainer.http.port") .value("8080"), systemProperty("java.protocol.handler.pkgs").value( "org.ops4j.pax.url"), systemProperty("org.ops4j.pax.url.war.importPaxLoggingPackages") .value("true"), mavenBundle().groupId("org.ops4j.pax.url") .artifactId("pax-url-war").version(asInProject()), mavenBundle().groupId("org.ops4j.pax.web") .artifactId("pax-web-spi").version(asInProject()), mavenBundle().groupId("org.ops4j.pax.web") .artifactId("pax-web-api").version(asInProject()), mavenBundle().groupId("org.ops4j.pax.web") .artifactId("pax-web-extender-war") .version(asInProject()), mavenBundle().groupId("org.ops4j.pax.web") .artifactId("pax-web-extender-whiteboard") .version(asInProject()), mavenBundle().groupId("org.ops4j.pax.web") .artifactId("pax-web-jetty").version(asInProject()), mavenBundle().groupId("org.ops4j.pax.web") .artifactId("pax-web-runtime") .version(asInProject()), mavenBundle().groupId("org.ops4j.pax.web") .artifactId("pax-web-jsp").version(asInProject()), mavenBundle().groupId("org.eclipse.jetty") .artifactId("jetty-util").version(asInProject()), mavenBundle().groupId("org.eclipse.jetty") .artifactId("jetty-io").version(asInProject()), mavenBundle().groupId("org.eclipse.jetty") .artifactId("jetty-http").version(asInProject()), mavenBundle().groupId("org.eclipse.jetty") .artifactId("jetty-continuation") .version(asInProject()), mavenBundle().groupId("org.eclipse.jetty") .artifactId("jetty-server").version(asInProject()), mavenBundle().groupId("org.eclipse.jetty") .artifactId("jetty-security").version(asInProject()), mavenBundle().groupId("org.eclipse.jetty") .artifactId("jetty-xml").version(asInProject()), mavenBundle().groupId("org.eclipse.jetty") .artifactId("jetty-servlet").version(asInProject()), mavenBundle().groupId("org.apache.geronimo.specs") .artifactId("geronimo-servlet_2.5_spec") .version(asInProject()), mavenBundle().groupId("org.ops4j.pax.url") .artifactId("pax-url-mvn").version(asInProject()), mavenBundle("commons-codec", "commons-codec"), wrappedBundle(mavenBundle("commons-httpclient", "commons-httpclient", "3.1")) // enable for debugging // , // vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"), // waitForFrameworkStartup() ); } @Before public void setUp() throws BundleException, InterruptedException { LOG.info("Setting up test"); webListener = new WebListenerImpl(); bundleContext.registerService(WebListener.class.getName(), webListener, null); String bundlePath = WEB_BUNDLE + "mvn:org.ops4j.pax.web.samples/war/1.1.0-SNAPSHOT/war?" + WEB_CONTEXT_PATH + "=/war"; installWarBundle = bundleContext.installBundle(bundlePath); installWarBundle.start(); int count = 0; while (!((WebListenerImpl) webListener).gotEvent() && count < 50) { synchronized (this) { this.wait(100); count++; } } } @After public void tearDown() throws BundleException { if (installWarBundle != null) { installWarBundle.stop(); installWarBundle.uninstall(); } } /** * You will get a list of bundles installed by default plus your testcase, * wrapped into a bundle called pax-exam-probe */ @Test public void listBundles() { for (Bundle b : bundleContext.getBundles()) { if (b.getState() != Bundle.ACTIVE) fail("Bundle should be active: " + b); Dictionary headers = b.getHeaders(); String ctxtPath = (String) headers.get(WEB_CONTEXT_PATH); if (ctxtPath != null) System.out.println("Bundle " + b.getBundleId() + " : " + b.getSymbolicName() + " : " + ctxtPath); else System.out.println("Bundle " + b.getBundleId() + " : " + b.getSymbolicName()); } } @Test public void testWebContextPath() throws Exception { testWebPath("http://127.0.0.1:8080/war/wc", "<h1>Hello World</h1>"); testWebPath("http://127.0.0.1:8080/war/wc/example", "<h1>Hello World</h1>"); testWebPath("http://127.0.0.1:8080/war/wc/sn", "<h1>Hello World</h1>"); } /** * @return * @throws IOException * @throws HttpException */ private void testWebPath(String path, String expectedContent) throws IOException, HttpException { GetMethod get = null; try { HttpClient client = new HttpClient(); get = new GetMethod(path); int executeMethod = client.executeMethod(get); assertEquals("HttpResponseCode", 200, executeMethod); String responseBodyAsString = get.getResponseBodyAsString(); assertTrue(responseBodyAsString.contains(expectedContent)); } finally { if (get != null) get.releaseConnection(); } } private class WebListenerImpl implements WebListener { private boolean event = false; ======= private static final String WEB_CONTEXT_PATH = "Web-ContextPath"; private static final String WEB_BUNDLE = "webbundle:"; private WebListener webListener; @Configuration public static Option[] configure() { return options( logProfile(), configProfile(), compendiumProfile(), systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level") .value("DEBUG"), systemProperty("org.osgi.service.webcontainer.hostname").value( "127.0.0.1"), systemProperty("org.osgi.service.webcontainer.http.port") .value("8080"), systemProperty("java.protocol.handler.pkgs").value( "org.ops4j.pax.url"), systemProperty("org.ops4j.pax.url.war.importPaxLoggingPackages") .value("true"), mavenBundle().groupId("org.ops4j.pax.url") .artifactId("pax-url-war").version(asInProject()), mavenBundle().groupId("org.ops4j.pax.web") .artifactId("pax-web-spi").version("1.1.0-SNAPSHOT"), mavenBundle().groupId("org.ops4j.pax.web") .artifactId("pax-web-api").version("1.1.0-SNAPSHOT"), mavenBundle().groupId("org.ops4j.pax.web") .artifactId("pax-web-extender-war") .version("1.1.0-SNAPSHOT"), mavenBundle().groupId("org.ops4j.pax.web") .artifactId("pax-web-extender-whiteboard") .version("1.1.0-SNAPSHOT"), mavenBundle().groupId("org.ops4j.pax.web") .artifactId("pax-web-jetty").version("1.1.0-SNAPSHOT"), mavenBundle().groupId("org.ops4j.pax.web") .artifactId("pax-web-runtime") .version("1.1.0-SNAPSHOT"), mavenBundle().groupId("org.ops4j.pax.web") .artifactId("pax-web-jsp").version("1.1.0-SNAPSHOT"), mavenBundle().groupId("org.eclipse.jetty") .artifactId("jetty-util").version(asInProject()), mavenBundle().groupId("org.eclipse.jetty") .artifactId("jetty-io").version(asInProject()), mavenBundle().groupId("org.eclipse.jetty") .artifactId("jetty-http").version(asInProject()), mavenBundle().groupId("org.eclipse.jetty") .artifactId("jetty-continuation") .version(asInProject()), mavenBundle().groupId("org.eclipse.jetty") .artifactId("jetty-server").version(asInProject()), mavenBundle().groupId("org.eclipse.jetty") .artifactId("jetty-security").version(asInProject()), mavenBundle().groupId("org.eclipse.jetty") .artifactId("jetty-xml").version(asInProject()), mavenBundle().groupId("org.eclipse.jetty") .artifactId("jetty-servlet").version(asInProject()), mavenBundle().groupId("org.apache.geronimo.specs") .artifactId("geronimo-servlet_2.5_spec") .version(asInProject()), mavenBundle().groupId("org.ops4j.pax.url") .artifactId("pax-url-mvn").version(asInProject()), mavenBundle("commons-codec", "commons-codec"), wrappedBundle(mavenBundle("commons-httpclient", "commons-httpclient", "3.1")) // enable for debugging // , // vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"), // waitForFrameworkStartup() ); } @Before public void setUp() throws BundleException, InterruptedException { LOG.info("Setting up test"); webListener = new WebListenerImpl(); bundleContext.registerService(WebListener.class.getName(), webListener, null); String bundlePath = WEB_BUNDLE + "mvn:org.ops4j.pax.web.samples/war/1.1.0-SNAPSHOT/war?" + WEB_CONTEXT_PATH + "=/war"; installWarBundle = bundleContext.installBundle(bundlePath); installWarBundle.start(); int count = 0; while (!((WebListenerImpl) webListener).gotEvent() && count < 50) { synchronized (this) { this.wait(100); count++; } } } @After public void tearDown() throws BundleException { if (installWarBundle != null) { installWarBundle.stop(); installWarBundle.uninstall(); } } /** * You will get a list of bundles installed by default plus your testcase, * wrapped into a bundle called pax-exam-probe */ @Test public void listBundles() { for (Bundle b : bundleContext.getBundles()) { if (b.getState() != Bundle.ACTIVE) fail("Bundle should be active: " + b); Dictionary headers = b.getHeaders(); String ctxtPath = (String) headers.get(WEB_CONTEXT_PATH); if (ctxtPath != null) System.out.println("Bundle " + b.getBundleId() + " : " + b.getSymbolicName() + " : " + ctxtPath); else System.out.println("Bundle " + b.getBundleId() + " : " + b.getSymbolicName()); } } @Test public void testWebContextPath() throws Exception { GetMethod get = null; try { HttpClient client = new HttpClient(); get = new GetMethod("http://127.0.0.1:8080/war/wc/example"); int executeMethod = client.executeMethod(get); assertEquals("HttpResponseCode", 200, executeMethod); String responseBodyAsString = get.getResponseBodyAsString(); assertTrue(responseBodyAsString.contains("<h1>Hello World</h1>")); get = new GetMethod("http://127.0.0.1:8080/war/wc"); executeMethod = client.executeMethod(get); assertEquals("HttpResponseCode", 200, executeMethod); responseBodyAsString = get.getResponseBodyAsString(); assertTrue(responseBodyAsString.contains("<h1>Hello World</h1>")); get = new GetMethod("http://127.0.0.1:8080/war/wc/sn"); executeMethod = client.executeMethod(get); assertEquals("HttpResponseCode", 200, executeMethod); responseBodyAsString = get.getResponseBodyAsString(); assertTrue(responseBodyAsString.contains("<h1>Hello World</h1>")); } finally { if (get != null) get.releaseConnection(); } } private class WebListenerImpl implements WebListener { private boolean event = false; >>>>>>>
<<<<<<< import androidx.constraintlayout.widget.Group; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; ======= >>>>>>> import androidx.constraintlayout.widget.Group; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; <<<<<<< ======= import butterknife.Unbinder; >>>>>>> import butterknife.Unbinder;
<<<<<<< import org.ops4j.pax.web.service.whiteboard.HttpContextMapping; import org.ops4j.pax.web.service.whiteboard.WhiteboardElement; ======= import org.ops4j.pax.web.service.WebContainerContext; >>>>>>> import org.ops4j.pax.web.service.WebContainerContext; import org.ops4j.pax.web.service.whiteboard.HttpContextMapping; import org.ops4j.pax.web.service.whiteboard.WhiteboardElement;
<<<<<<< final boolean validateCertificates; final boolean httpKeepAlive; final boolean hasTrustStorePath; final String trustStorePath; final String trustStorePassword; final int eventBatchTimeout; final int ackPollInterval; final int ackPollThreads; final int maxHttpConnPerChannel; ======= >>>>>>>
<<<<<<< /* * Copyright (C) 2012-2019 52°North Initiative for Geospatial Open Source ======= /** * Copyright (C) 2012-2020 52°North Initiative for Geospatial Open Source >>>>>>> /* * Copyright (C) 2012-2020 52°North Initiative for Geospatial Open Source
<<<<<<< private Locale defaultLocale = Locale.US; ======= private Currency currency; { try { currency = Currency.getInstance(locale); } catch (IllegalArgumentException e) { currency = Currency.getInstance(Locale.US); } } >>>>>>> private Currency currency; { try { currency = Currency.getInstance(locale); } catch (IllegalArgumentException e) { currency = Currency.getInstance(Locale.US); } } private Locale defaultLocale = Locale.US; <<<<<<< return CurrencyTextFormatter.formatText(val, locale, defaultLocale); ======= return CurrencyTextFormatter.formatText(val, currency, locale); >>>>>>> return CurrencyTextFormatter.formatText(val, currency, localedefaultLocale, defaultLocale); <<<<<<< return CurrencyTextFormatter.formatText(String.valueOf(rawVal), locale, defaultLocale); ======= return CurrencyTextFormatter.formatText(String.valueOf(rawVal), currency, locale); >>>>>>> return CurrencyTextFormatter.formatText(String.valueOf(rawVal), currency, locale, defaultLocale);
<<<<<<< private final JSONObject root; private final JSONObject aps; private final JSONObject customAlert; ======= private JSONObject root; private JSONObject aps; private JSONObject customAlert; >>>>>>> private final JSONObject root; private final JSONObject aps; private final JSONObject customAlert; <<<<<<< private static final int PACKET_LENGTH = 255; public int length() { int length = 1 + 2 + 32 + 2; String str = this.copy().toString(); int payloadLength = Utilities.toUTF8Bytes(str).length; return length + payloadLength; } public boolean isTooLong() { return this.length() > PACKET_LENGTH; } public PayloadBuilder resizeAlertBody(int packetLength) { int currLength = length(); if (currLength < packetLength) return this; int d = packetLength - currLength; String body = aps.getString("alert"); if (body.length() < d) aps.remove("alert"); else aps.put("alert", body.subSequence(0, d)); return this; } public PayloadBuilder shrinkBody() { return resizeAlertBody(PACKET_LENGTH); } ======= /** * Returns the JSON String representation of the payload * according to Apple APNS specification * * @return the String representation as expected by Apple */ >>>>>>> private static final int PACKET_LENGTH = 255; public int length() { int length = 1 + 2 + 32 + 2; String str = this.copy().toString(); int payloadLength = Utilities.toUTF8Bytes(str).length; return length + payloadLength; } public boolean isTooLong() { return this.length() > PACKET_LENGTH; } public PayloadBuilder resizeAlertBody(int packetLength) { int currLength = length(); if (currLength < packetLength) return this; int d = packetLength - currLength; String body = aps.getString("alert"); if (body.length() < d) aps.remove("alert"); else aps.put("alert", body.subSequence(0, d)); return this; } public PayloadBuilder shrinkBody() { return resizeAlertBody(PACKET_LENGTH); } /** * Returns the JSON String representation of the payload * according to Apple APNS specification * * @return the String representation as expected by Apple */
<<<<<<< import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; ======= import org.apache.commons.httpclient.ConnectMethod; import org.apache.commons.httpclient.NTCredentials; import org.apache.commons.httpclient.ProxyClient; import org.apache.commons.httpclient.UsernamePasswordCredentials; import org.apache.commons.httpclient.auth.AuthScope; import org.slf4j.Logger; import org.slf4j.LoggerFactory; >>>>>>> import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.apache.commons.httpclient.ConnectMethod; import org.apache.commons.httpclient.NTCredentials; import org.apache.commons.httpclient.ProxyClient; import org.apache.commons.httpclient.UsernamePasswordCredentials; import org.apache.commons.httpclient.auth.AuthScope; import org.slf4j.Logger; import org.slf4j.LoggerFactory; <<<<<<< @SuppressFBWarnings(value = "VA_FORMAT_STRING_USES_NEWLINE", justification = "use <CR><LF> as according to RFC, not platform-linfeed") void makeTunnel(String host, int port, OutputStream out, InputStream in) throws IOException { // Send the HTTP CONNECT request. String userAgent = "java-apns"; String connect = String.format("CONNECT %1$s:%2$d HTTP/1.1\r\n" + "Host: %1$s:%2$d\r\n" + "User-Agent: %3$s\r\n" + "Proxy-Connection: Keep-Alive\r\n" // For HTTP/1.0 proxies like Squid. + "\r\n", host, port, userAgent); out.write(connect.getBytes("UTF-8")); // Read the proxy's HTTP response. String statusLine = readAsciiUntilCrlf(in); if (!statusLine.matches("HTTP\\/1\\.\\d 2\\d\\d .*")) { // We didn't get a successful response like "HTTP/1.1 200 OK". throw new ProtocolException("TLS tunnel failed: " + statusLine); ======= Socket makeTunnel(String host, int port, String proxyUsername, String proxyPassword, InetSocketAddress proxyAddress) throws IOException { if(host == null || port < 0 || host.isEmpty() || proxyAddress == null){ throw new ProtocolException("Incorrect parameters to build tunnel."); >>>>>>> @SuppressFBWarnings(value = "VA_FORMAT_STRING_USES_NEWLINE", justification = "use <CR><LF> as according to RFC, not platform-linfeed") Socket makeTunnel(String host, int port, String proxyUsername, String proxyPassword, InetSocketAddress proxyAddress) throws IOException { if(host == null || port < 0 || host.isEmpty() || proxyAddress == null){ throw new ProtocolException("Incorrect parameters to build tunnel.");
<<<<<<< int port, Proxy proxy, ReconnectPolicy reconnectPolicy, ApnsDelegate delegate) { this(factory, host, port, proxy, reconnectPolicy, delegate, false, ApnsConnection.DEFAULT_CACHE_LENGTH, true, 0, 0); ======= int port, Proxy proxy, String proxyUsername, String proxyPassword, ReconnectPolicy reconnectPolicy, ApnsDelegate delegate) { this(factory, host, port, proxy, proxyUsername, proxyPassword, reconnectPolicy, delegate, false, ApnsConnection.DEFAULT_CACHE_LENGTH, true); >>>>>>> int port, Proxy proxy, String proxyUsername, String proxyPassword, ReconnectPolicy reconnectPolicy, ApnsDelegate delegate) { this(factory, host, port, proxy, proxyUsername, proxyPassword, reconnectPolicy, delegate, false, ApnsConnection.DEFAULT_CACHE_LENGTH, true, 0, 0); <<<<<<< this.readTimeout = readTimeout; this.connectTimeout = connectTimeout; ======= this.proxyUsername = proxyUsername; this.proxyPassword = proxyPassword; >>>>>>> this.readTimeout = readTimeout; this.connectTimeout = connectTimeout; this.proxyUsername = proxyUsername; this.proxyPassword = proxyPassword; <<<<<<< return new ApnsConnectionImpl(factory, host, port, proxy, reconnectPolicy.copy(), delegate, errorDetection, cacheLength, autoAdjustCacheLength, readTimeout, connectTimeout); ======= return new ApnsConnectionImpl(factory, host, port, proxy, proxyUsername, proxyPassword, reconnectPolicy.copy(), delegate, errorDetection, cacheLength, autoAdjustCacheLength); >>>>>>> return new ApnsConnectionImpl(factory, host, port, proxy, proxyUsername, proxyPassword, reconnectPolicy.copy(), delegate, errorDetection, cacheLength, autoAdjustCacheLength, readTimeout, connectTimeout);
<<<<<<< import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; ======= import java.util.concurrent.*; import org.slf4j.LoggerFactory; import org.slf4j.Logger; >>>>>>> import java.util.concurrent.*;